ComfyUI Image to Image Workflow
This guide will help you understand and complete an image to image workflow
What is Image to Image
Image to Image is a workflow in ComfyUI that allows users to input an image and generate a new image based on it.
Image to Image can be used in scenarios such as:
- Converting original image styles, like transforming realistic photos into artistic styles
- Converting line art into realistic images
- Image restoration
- Colorizing old photos
- … and other scenarios
To explain it with an analogy: It’s like asking an artist to create a specific piece based on your reference image.
If you carefully compare this tutorial with the Text to Image tutorial, you’ll notice that the Image to Image process is very similar to Text to Image, just with an additional input reference image as a condition. In Text to Image, we let the artist (image model) create freely based on our prompts, while in Image to Image, we let the artist create based on both our reference image and prompts.
ComfyUI Image to Image Workflow Example Guide
1. Preparation
Make sure you have at least one image model installed in your ComfyUI/models/
directory, such as Download v1-5-pruned-emaonly-fp16.safetensors
Save and download the image below to your local machine, then drag and drop or use ComfyUI to open it to load the corresponding workflow
Or load the image to image workflow from ComfyUI’s workflow template
Download the image below as an example, we’ll use it in later steps
2. Starting the Image to Image Workflow
After loading the Image to Image workflow, please follow these numbered steps while referring to the image to complete the example workflow generation:
- Load your local image model in the Load Checkpoint node
- Click the
upload
button in the Load Image node to upload the image provided in the preparation step - Click the
Queue
button or use the shortcutCtrl + Enter
to execute the image generation
Start Your Own Experiments
- Try modifying the
denoise
parameter in the KSampler node, gradually changing it from 1 to 0, and observe the changes in the generated images - Replace with your own prompts and reference images to generate your own image effects
Key Points of Image to Image Workflow
The key to the Image to Image workflow lies in the denoise
parameter in the KSampler
node, which should be less than 1
If you’ve adjusted the denoise
parameter and generated images, you’ll notice:
- The smaller the
denoise
value, the smaller the difference between the generated image and the reference image - The larger the
denoise
value, the larger the difference between the generated image and the reference image
This is because denoise
determines the strength of noise added to the latent space image after converting the reference image. If denoise
is 1, the latent space image will become completely random noise, making it the same as the latent space generated by the empty latent image
node, losing all characteristics of the reference image.
For the corresponding principles, please refer to the principle explanation in the Text to Image tutorial.
Was this page helpful?