Nodes/ComfyUI-Img2Img-Turbo/Img2ImgTurboEdgeRun
ComfyUI Node

Img2ImgTurboEdgeRun

Edges to finished image in one step — and the gamma knob that does nothing

By chaojie·Created 2 years ago·Updated 2 years ago· 39
Img2ImgTurboEdgeRun
  • model
  • image
  • IMAGE
prompt
seed1234
gamma0.40

Img2ImgTurboEdgeRun takes a Canny edge map and a prompt and returns a finished image after exactly one denoising step. No sampler settings, no CFG, no step count - the speed is baked into the distilled model itself. If you've ever fought with a canny ControlNet and its guidance-start sliders and strength weights, this is the "screw it, one step" version.

How it works

The node is built on CMU's img2img-turbo: a stabilityai/sd-turbo UNet plus an edge_to_image LoRA, running a single UNet pass at timestep 999, then decoding straight to RGB. The whole thing is a distilled image-to-image translation model, not a ControlNet - the conditioning is part of the model, so there's no control weight to tune.

The input image is resized to a multiple of 8 and fed in as-is. Critically, the node does not compute edges for you. It expects the image you hand it to already be an edge map. The pack's example workflow does this properly: photo → CannyEdgePreprocessor → this node. Feed it a normal photo and you'll get back a weird smoothed mush of whatever it thinks your "edges" mean.

The inputs that matter

Five inputs in the schema, but only three do anything:

  • model - the Img2ImgTurboEdgeModel from Img2ImgTurboEdgeLoader.
  • image - must be a Canny edge map. This is the one people get wrong.
  • prompt - free text that steers what the edges become. Empty works and gives you a fairly faithful edge-to-image reconstruction; a prompt like "a red car" pushes the content. This is your real creative control.
  • seed - accepted, then ignored. The edge path is deterministic, so the same edge map plus prompt always gives the same image.
  • gamma - the trap. It's in the schema with a default of 0.4, but the code never passes it to the model. On the sketch sibling, gamma is a real randomness dial. Here it's a dead widget. Don't fiddle with it expecting variation - change the prompt or the edges instead.

Output

A single IMAGE output, already decoded to RGB in 0–1 float space. Wire it straight into PreviewImage or SaveImage; no extra VAE decode needed.

Installing

The whole pack installs at once. ComfyUI Manager → search ComfyUI-Img2Img-Turbo → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/chaojie/ComfyUI-Img2Img-Turbo
pip install -r ComfyUI-Img2Img-Turbo/requirements.txt

Then restart ComfyUI. First run downloads the base model and edge LoRA, which takes a few minutes and prints progress to the console.

Common issues

  • Feeding a raw photo instead of edges - the number one mistake. Add a CannyEdgePreprocessor (thresholds around 100/200 work well) between your image and this node.
  • Diffusers version drift. The pack pins diffusers==0.25.1; if another node upgraded it, re-pin with pip install 'diffusers>=0.24.0,<=0.25.1' (the README's own advice).
  • CUDA only. .cuda() is hard-coded, so no CPU or MPS inference.
  • It's an SD-1.5-class model, so keep input edges near 512–768 for best quality; upscaling a big canvas in one step gets soft fast.

It's a niche, research-flavored node - but for fast edge-to-image iteration it's a fun little hammer.

CategoryImg2ImgTurbo

Inputs (5)

NameTypeDefaultDescription
modelImg2ImgTurboEdgeModel
imageIMAGE
promptSTRING
seedINT1234
gammaFLOAT0.40

Outputs (1)

NameTypeDescription
IMAGEIMAGE