Week 8 · Lesson 7 of 10

Using Image-to-Image to Balance Preservation and Change

0% Complete

Core Idea

Text-to-image begins from random noise. Image-to-image begins from an existing image that has been encoded into latent space. The prompts still guide the result, but denoise determines how much of the original image is preserved and how much is replaced.

Image-to-image is not a separate application mode. It is a modification of the standard node graph: replace the Empty Latent Image with Load Image followed by VAE Encode.

How It Works

A visible image cannot be connected directly to the KSampler's latent input. It must first be converted into a latent representation.

The image-to-image path is:

Load Image -> Vae Encode -> Ksampler Latent Image Input

The VAE Encode node receives the uploaded image and the checkpoint's VAE. Its latent output replaces the Empty Latent Image used in text-to-image. The KSampler, prompts, model, VAE Decode, and preview stages remain in place.

Denoise changes meaning in this context. With an empty latent, 1.0 means remove all the random starting noise. With an encoded image, denoise means how much of the uploaded image should be removed and regenerated.

Denoise 0.0: The result remains the uploaded image; no meaningful change is introduced.

Denoise 1.0: The original image is removed completely, producing a substantially different result.

Denoise 0.3: The output remains relatively similar to the input.

Denoise 0.8: The output differs much more from the input.

At 0.3, the output retains more of the uploaded image's visual structure. At 0.8, the prompt and model replace more of that structure.

A Lightning checkpoint is used with approximately seven steps. This preserves the model's fast-generation behavior while the denoise value controls similarity.

Why It Matters

Image-to-image provides a direct control that text prompts alone cannot: the degree to which an existing composition or design should survive. It can be used to reinterpret an image while retaining part of its arrangement, or to introduce controlled variation without starting from an unrelated noise pattern.

It is also the mechanism behind the stronger upscaling method taught in the next lesson. Tiled upscaling works because each tile is passed through image-to-image at low denoise, allowing new detail while retaining most of the original image.

Practical Application

Convert a text-to-image graph into image-to-image:

  1. Copy the existing text-to-image workflow so the original remains available.
  2. Bypass the branch that should not run.
  3. Delete the Empty Latent Image from the active branch.
  4. Add Load Image and upload the source image.
  5. Drag from the image output and add VAE Encode.
  6. Connect the checkpoint's VAE output to the VAE Encode node.
  7. Connect the encoded latent output to the KSampler's Latent Image input.
  8. Keep the positive and negative prompt connections in place.
  9. Set denoise to 0.3 for a conservative first test.
  10. Queue the workflow and compare the output with the original.
  11. Increase denoise to 0.8 and queue again to observe a stronger transformation.

Because only the denoise setting changed, ComfyUI begins from the modified stage rather than reloading the checkpoint and recomputing every unchanged node.

Trade-Offs and Limitations

Low denoise preserves the input but limits the degree of change. If the prompt describes a major transformation, a very low value may not give the model enough freedom to produce it.

High denoise increases variation but can destroy the composition or details that made the input useful. At 1.0, the workflow no longer meaningfully preserves the image.

The value is therefore not a universal quality setting. It is a similarity control, and the appropriate setting depends on how much of the source image should survive.

Key Takeaway

Image-to-image replaces random-noise input with a VAE-encoded image. Denoise then becomes the central similarity dial: low values preserve, high values transform.

Back to top