img2img
last edited
img2img seeds generation from an existing image instead of pure noise. The source image is encoded into latent space, partially noised, and then denoised under a new prompt. The output inherits the source's composition while the model reinvents its surface. The technique is model-agnostic and appears in most diffusion toolkits.
Strength parameter
Strength is one of several key parameters, alongside the prompt, guidance scale and step count. In the diffusers documentation, strength sets how much noise is added to the source image. The number of noise steps added equals strength times the total steps.
Higher strength means more departure from the input. A value of 1.0 effectively ignores the source image, so the result behaves like text-to-image generation. Lower values keep more of the original layout and color.
Workflows
img2img is the core loop of iterative AI artmaking. An artist generates, picks the best result, feeds it back with corrections, and repeats until it converges on the intended image.
It also bridges traditional and AI workflows. Painters block in rough compositions, photographers restyle shots, and 3D artists skin untextured renders.
Related techniques
Inpainting applies the same mechanic to a masked region. Style transfer can use img2img with style prompts or reference adapters. Deforum chains the process across animation frames. Further reading covers core techniques.
Sources
- SDEdit paper by Meng et al. — The paper dates to August 2021. It describes image-guided synthesis and editing with stochastic differential equations, the research basis for the technique, though it does not use the term img2img.
- diffusers img2img documentation — The guide from Hugging Face to image-to-image pipelines covers source images, prompts and strength.
- diffusers releases on GitHub — The notes for Stable Diffusion pipelines and newer image editing models are listed per version.