ComfyUI image-to-image workflow: control denoise and detail

ComfyUI image to image workflow

A useful ComfyUI image-to-image workflow starts with an existing picture, converts it to a latent image, and lets you control how much the diffusion model can redraw it. The difficult part is finding enough denoise to make the requested change without sacrificing the details you wanted to keep.

This tutorial provides an eight-node workflow, a fixed reference image and a five-setting comparison designed to locate that boundary. If you would rather generate or edit images in a browser, the DIY AI Image Generator offers a separate workflow, but it does not expose this local KSampler graph.

Download the minimal ComfyUI img2img workflow.

The accompanying ComfyUI image-to-image study kit contains an importable JSON graph, an original 512 x 512 reference JPG, a comparison CSV and a small pixel-difference checker. It uses eight standard nodes and no custom extensions. The kit also includes a separate API-format prompt for readers automating their own runs.

  1. Put the supplied diyai-comfyui-img2img-source.jpg in ComfyUI’s input directory, or select it through the Load Image node’s upload control.
  2. Open diyai-comfyui-img2img-denoise-workflow.json using ComfyUI’s workflow Open action. This is the canvas graph; the separate API JSON is not a substitute.
  3. Select v1-5-pruned-emaonly-fp16.safetensors in Load Checkpoint. You need that SD 1.5 checkpoint installed locally; the JSON does not contain model weights.
  4. Check that the supplied source image is selected in Load Image and that the KSampler seed mode is fixed. Queue one image at the default 0.50 denoise; count this as the 0.50 trial.
  5. Run the four remaining denoise values in the study table below, saving a clearly named output after each run.

The checkpoint and input-image setup follows ComfyUI’s official image-to-image tutorial. This graph deliberately uses the conventional SD 1.5 checkpoint loader, not the model-specific node arrangements used by many newer editing models.



How the eight nodes connect

NodeConnectionJob
Load CheckpointMODEL, CLIP and VAE outputsSupplies the matching diffusion model, text encoder and autoencoder.
Load ImageIMAGE to VAE EncodeProvides the source pixels instead of a blank latent.
VAE EncodeLATENT to KSampler’s latent_imageConverts the input image into the model’s latent representation.
Two CLIP Text Encode nodesCONDITIONING to positive and negativeDescribe the requested image and unwanted features.
KSamplerLATENT to VAE DecodeAdds controlled noise and samples the edited latent.
VAE DecodeIMAGE to Save ImageTurns the latent result back into visible pixels.
Save ImageFinal outputWrites each render into ComfyUI’s output directory.

The important change from text-to-image is Load Image – VAE Encode – KSampler in place of Empty Latent Image. Denoising below 1.0 lets the input influence the result. At 1.0, standard img2img sampling effectively discards the original composition, even though the graph still contains the image input.

Run a controlled denoise comparison, not five different prompts

The reference image shows a red ceramic mug on an oak table, with a green apple, folded linen napkin and timber window behind it. The requested edit is narrow: make the mug cobalt blue while keeping its shape, handle, surrounding objects, viewpoint and lighting recognisable.

Use the same configuration for every run:

SettingFixed value
Checkpointv1-5-pruned-emaonly-fp16.safetensors (SD 1.5)
Inputdiyai-comfyui-img2img-source.jpg, 512 x 512
Seed / mode42 / fixed
Steps / CFG24 / 7
Sampler / schedulereuler / normal
Prompt and negative promptUnchanged across all five runs; both are embedded in the JSON
Only variableKSampler denoise

The positive prompt describes a photorealistic still life with a cobalt-blue mug, right-facing handle, the same green apple and folded cream napkin, unchanged camera viewpoint and natural window light. Keep the complete embedded prompt rather than rewriting it between renders. Requesting an unchanged viewpoint is guidance, not a geometrical lock.

DenoiseWhat this run testsInspect most closely
0.20Whether subtle repainting is enough for any visible colour shift.Does the mug remain red despite good shape preservation?
0.35Whether a restrained edit starts obeying the new colour instruction.Colour on the body and handle versus increased contrast alone.
0.50Whether a stronger style and colour change can coexist with the original layout.Mug silhouette, apple position, linen folds and window lines.
0.65Whether better prompt compliance comes at the cost of reconstructing objects.Handle geometry, contact shadows, fruit shape and reflections.
0.80How much of the source scene survives a substantial redraw.Composition drift, replaced details and invented edges.

These rows are test questions, not measured outputs. The graph and fixed source are supplied so the comparison can be repeated, but the five SD 1.5 renders have not been executed for this article. The specific point where preservation becomes transformation must be established from the resulting files, not assigned from a universal denoise chart.

Find the first usable edit, not the prettiest redraw

Define acceptance before opening the output folder. The mug must visibly turn blue, its rim and handle should remain recognisable, and the apple, napkin and window must not acquire new shapes or positions. A render that looks more detailed but moves the apple has failed the preservation brief. A perfectly preserved red mug has failed the requested change.

Mark each of those checks separately in the accompanying CSV. The best setting is the lowest denoise that completes the colour change without unacceptable collateral edits, if any of the five settings does. There is no need to reward higher denoise simply because the result looks sharper at thumbnail size.

The kit’s Python helper measures mean absolute RGB pixel difference inside an approximate mug rectangle and outside it. An outside-region value of zero means identical RGB pixels in that comparison; a larger value means more pixel change. It is not a perceptual-quality score. A harmless lighting shift can raise it, while a distorted handle might occupy too few pixels to dominate the average. Use the metric to flag images for inspection, not to approve them automatically.

Separate VAE reconstruction drift from sampler changes

There is a control case that basic tutorials frequently miss. The input has to pass through the VAE before the sampler can edit it, and encoding then decoding may alter fine texture or colour slightly on its own. If you compare every output only with the original JPG, you can accidentally blame denoise for a difference introduced before sampling.

To establish a baseline, temporarily connect VAE Encode directly to VAE Decode, bypassing KSampler, and save that reconstructed image. Compare it with the source, then restore the sampler connection and run the five-setting study. The helper supports an optional --baseline image so you can compare each output against this reconstructed starting point instead. Keep both comparisons: source versus output tells you about total change, while VAE baseline versus output better isolates the sampler’s contribution.

Use the original output dimensions throughout. Resizing between trials introduces another uncontrolled change, and different model families can have different optimal image sizes and denoising behaviour.

Why a fixed seed cannot guarantee a successful colour change

A fixed seed makes the noise generation repeatable within the same environment and settings. It does not pin the object’s outline, guarantee identical pixels after a model update or force the prompt to override retained colour information. Changing denoise also changes the sampled noise schedule. The five outputs are a controlled parameter sweep, not five stages of one continuously edited image.

This issue is more than theoretical. In DIY AI’s local image generator guide, an earlier red-to-blue cabin experiment at 0.35 denoise completed but left the cabin red. The scene’s general structure survived while contrast increased. That is evidence for the cabin experiment only, not an invented result for this mug workflow. It illustrates why completion status and edit success need separate checks.

In practical img2img discussions, people repeatedly encounter the same trap: the lowest-denoise image can look pleasingly faithful while ignoring the requested edit, and higher values can solve the edit by changing unrelated details. Record both failures. Do not tune the prompt, seed, CFG and denoise simultaneously, or you will not know which adjustment helped.

Your search, your sources
Make DIY AI a preferred source

See more of our reporting in Google Top Stories, AI Overviews and AI Mode.

Add DIY AI on Google

Improve detail without destroying the reference.

If the mug becomes blue but the glaze turns noisy, first inspect the exact output at 100% zoom. Stronger sharpening in the prompt is not a substitute for a good source image. Increasing denoise again may redraw the apple, the mug’s handle or the window frame. Likewise, changing sampler and CFG during the denoise sweep would invalidate the comparison.

A sensible second pass starts only after selecting an acceptable first-pass render. Keep the accepted image as the new input, lower denoise for minor surface refinement and record it as a separate experiment. Do not count that two-pass output as one of the original five runs. Standard KSampler also does not automatically execute fewer sampling steps merely because denoise is lower; this study runs 24 steps at each setting.

There is a limit to what whole-image img2img can do. If you need the exact red mug recoloured while every other pixel remains untouched, a conventional colour adjustment is more deterministic. If the mug needs a new handle or one local area repaired, use masked inpainting rather than repeatedly regenerating the entire frame. For broader model choices, the AI image editing models comparison explains why edit success and preservation need separate assessment.

Diagnose a workflow failure before changing settings

SymptomLikely causeFirst check
Checkpoint is missing or redThe named SD 1.5 file is absent or in another model directory.Select an installed compatible checkpoint; confirm the correct ComfyUI model path.
Load Image failsThe source JPG has not been uploaded or copied into the input directory.Choose the supplied file again in Load Image.
The same image appears five timesThe denoise field did not change, or cached output was mistaken for a new render.Check the KSampler value and ensure the saved filenames are distinct.
Objects keep shiftingWhole-image denoise is reconstructing more of the scene than the task can tolerate.Try a lower denoise; switch to a local editing method if the target edit fails.
Colours drift but the edit failsLow denoise preserves the old mug colour more strongly than the prompt changes it.Review the next controlled denoise step before changing CFG or prompt wording.
The graph imports but cannot runCheckpoint mismatch, model unavailable or a local-version difference.Read the first red-node error and verify each core node; no custom nodes are required.

Keep the graph simple until you know the preservation limit

Start with the supplied source, checkpoint, prompt and five KSampler values. Fill the study log with actual observations, including failed attempts, before adding upscalers, LoRAs or other controls. Only then decide whether a second-pass img2img refinement is worthwhile or whether the task needs a different editing method.

If the main constraint is convenience rather than a reproducible local node graph, DIY AI’s AI image generator comparison is a better place to choose a different tool. For ComfyUI, the result worth keeping is the first one that changes the intended detail while leaving the rest of the picture fit for use.

You Might Also Like:

Best AI Image Generators 2026

Best AI Image Tools 2026

By: Steven Jones On:
Updated on: August 24, 2026
Best overall: OpenAI GPT Image 2, with a 9.6/10 score in the current DIY AI image generation dataset. That does…
AI image combiner

AI Image Combiner

By: Steven Jones On:
Updated on: October 21, 2026
An AI image combiner lets you merge two or more source photos into a new image, not just place them…
Adobe Firefly Review

Adobe Firefly Review

By: Steven Jones On:
Adobe Firefly is worth shortlisting if you create campaign visuals, product mock-ups or short video assets. Its strongest selling point…
Steven Jones

Writer: Steven Jones

AI Tools Reviewer and Technical Analyst

Steven Jones is a technology analyst specialising in artificial intelligence, machine learning workflows, and emerging automation tools.

At DIY AI, he focuses on clear, practical guidance for people comparing AI tools in the real world. His work covers text generation, image generation, video tools, data platforms, developer-focused AI products, and the automation workflows that connect them.

Steven's reviews are built around hands-on testing, practical benchmarks, and transparent scoring rather than vendor claims. He looks closely at where each tool performs well, where it falls short, and what those trade-offs mean for creators, teams, and businesses trying to make sensible AI adoption decisions.

He has a particular interest in safety, reliability, output quality, performance metrics, and dataset quality. When he is not reviewing the latest AI model updates, he experiments with prompt engineering techniques and contributes to DIY AI ongoing work on fair, explainable scoring frameworks for AI tools.

Contact

Leave a Comment On: Comfyui Image-to-image Workflow

Your email address will not be published.