How to transfer Image Style to Another?

Hi everyone,

I’ve been trying to use DALL·E/ChatGPT to replicate the style or filter from a reference image (created by photography professionals) and apply it to my own images. However, I haven’t found an Image-to-Image transformation API that allows input for both a reference image and a target image.

To work around this, I’ve been using a multi-step approach:

  1. I ask GPT to describe the style adjustments needed to match the reference image.

  2. I use that description to apply adjustments to my own image.

  3. If the result isn’t quite right, I refine it further in additional steps.

My problem is that Step 2 is usually not sufficient. For example, applying the adjustment from step 1 to one image looks great but another image has blown out the skin brightness, etc etc.

My questions:

• Is there a better way to achieve consistent results?

• If not, how can I refine my approach to improve reliability?

Would love any insights—thanks in advance!

2 Likes

Did you ever try to do it by prompting? Like, try it in th chatgpt chat first.

Tell it to extract the style from Pic 1, then apply it to Pic 2. If you found a prompt that works quite well use it with the API, isn’t it?

3 Likes

That’s what I had tried as step 1 and 2 in my original post. I wonder if there are better ways to do this or optimize it with better prompting strategies.

2 Likes

By the way welcome to the forum, youngcc3157.

Yeah, and I guess though in 1. you asked him. You didn’t ask him for the prompt, did you? Not to blame you, just to understand what you really tried. :slight_smile:

I tried to recreate what most likely could have been done. Upper part.

The lower part with the longer prompt, I told ChatGPT to write the prompt itself.

For the sake of better copying, I’ll post it in here as well:

Me:

Write me a prompt to as accurately transfer a style from image 1. to image 2.
Make it so accurate that it will be consistent if I use this prompt with one of your APIs. Thanks.

ChatGPT:

Here is a highly detailed and structured prompt to ensure accurate style transfer from Image 1 (style image) to Image 2 (content image). This prompt is designed for use with an AI model that supports style transfer, ensuring consistency across multiple applications.


Prompt for AI Style Transfer:

"Apply the artistic style of Image 1 to Image 2 while preserving the structural integrity and key subject details of Image 2. The transformation should meticulously capture the following aspects from Image 1:

  • Color Palette: Match the dominant hues, shading, and gradient transitions exactly. Ensure that the contrast levels, saturation, and tonality reflect the artistic characteristics of Image 1.
  • Brushstrokes and Texture: Replicate the brushwork, patterns, and any distinctive textures present in Image 1 to ensure a seamless and natural application. Maintain the level of detail or abstraction appropriate to the artistic medium.
  • Lighting and Shadowing: Preserve the lighting effects, directional shadows, and overall luminosity of Image 1. Adapt these properties proportionally to Image 2 to ensure a cohesive blend.
  • Line Work and Edge Definition: Adjust the sharpness or softness of lines based on the style of Image 1. If the style is painterly and impressionistic, soften edges accordingly. If it’s detailed and illustrative, maintain precise line work.
  • Depth and Perspective: Maintain the original depth perception of Image 2 while integrating the perspective cues from Image 1 to create a natural yet transformed aesthetic.
  • Artistic Medium: Ensure that the result embodies the medium of Image 1—whether it is an oil painting, watercolor, digital illustration, or sketch. Every detail should align with the target medium’s unique characteristics.

Consistency Requirement: The transformation must be repeatable with minimal variance across multiple applications using the same inputs. Ensure that the style application follows deterministic guidelines, where each iteration maintains the same level of detail, brushstroke fidelity, and overall composition accuracy.

Final output should be a high-fidelity, detailed rendering of Image 2 in the exact artistic style of Image 1, without loss of important features from the content image."


This structured prompt ensures that the style transfer remains highly accurate and repeatable. Let me know if you’d like any refinements!

Hope that helps.

1 Like