Skip to content

AI Image Generation

Image-to-Image (img2img)

Image-to-image (img2img) is AI image generation that starts from an existing picture and a prompt, and returns a new image that keeps part of the original.

By ThumbnailMaker Team · checked against YouTube's own help pages ·

What is image-to-image (img2img)?

Image-to-image, shortened to img2img, is AI image generation that starts from a picture you supply instead of from nothing. You give the model an image and a prompt. It returns a new image that keeps some of the original, such as the layout, the colours or the pose, and changes the rest to match the words.

Hugging Face's diffusers documentation describes it as text-to-image with one addition: "you can also pass an initial image as a starting point for the diffusion process".

How img2img works

A diffusion model normally builds an image out of pure random noise, step by step. Img2img starts from your picture instead. The picture is encoded, a chosen amount of noise is added to it, and the model removes that noise again while following the prompt. Whatever survives the noise survives into the result.

The method was published in 2021 as SDEdit, in a paper by Chenlin Meng and colleagues: "SDEdit first adds noise to the input, then subsequently denoises the resulting image." The paper frames the whole job as a balance between realism and faithfulness to the input.

What strength does

In Stable Diffusion, that balance is one setting, strength, from 0 to 1. The diffusers docs spell it out:

  • A higher strength gives the model more freedom; at 1.0 "the initial image is more or less ignored".
  • A lower strength keeps the result more similar to the original.
  • Strength also sets how many steps run. With 50 steps and a strength of 0.8, the pipeline adds 40 steps of noise and then removes them over 40 steps.

The prompt still matters. The guidance scale sets how closely the result follows the words, and the docs suggest combining the two: low strength with low guidance for an image that resembles the original without being bound to the prompt.

Img2img vs inpainting vs instruction editing

Img2imgInpaintingInstruction editing
InputAn image and a promptAn image, a mask and a promptAn image and a sentence saying what to change
What changesThe whole image, as far as the strength allowsOnly the masked areaWhat the sentence names
WhereStable Diffusion's img2img modeStable Diffusion's inpainting modelsGoogle's Gemini image models

The diffusers docs call img2img and inpainting "very similar tasks": inpainting does the same thing but only inside the mask, leaving the rest unchanged. Google's guide for its Gemini image models describes the third approach: "Provide an image and use text prompts to add, remove, or modify elements, change the style, or adjust the color grading." The mask there is defined in words, not painted.

Where you see it

In AUTOMATIC1111's web UI, img2img is a mode of its own, listed in the project's features beside txt2img. In code, the diffusers library has a dedicated image-to-image pipeline. Gemini's image models take an uploaded picture with your message, which is instruction editing rather than strength-based img2img: there is no strength to set.

Why img2img matters for a thumbnail

Most thumbnails start from a picture that already exists: a frame from the video, a product photo, last week's thumbnail. Starting from it keeps what was already right.

The trade-off cuts hardest on the words. A thumbnail's text is small and must stay spelled exactly, and a global repaint at a high strength is free to change it along with everything else. A change named in one sentence, with the rest of the image held still, suits a thumbnail better: "change 90 to 365" fixes the number without redrawing the face.

Sources

Turn your image into a thumbnailUpload a picture and say what to change in a sentence: the parts you don't name stay as they are. Or resize it to 1280 × 720 for free.

Frequently asked questions

Start with your next video

Try it on your next video.

Paste the video's link and the brief is written for you, free.

Your first 3 thumbnails are free, no card. Then from $12 a month for 40.