Try Pro FREE for 2 weeksGet Started

Img2Img-ControlNetXL-Canny — Img2Img AI Model

Generate an SDXL image that follows an edge map: give it Canny outlines plus a prompt and the result keeps that structure. Sticks to the lines more tightly than the Union variant. Outputs up to 1024×1024. The control image can be up to 1024×1024.

What it does

ControlNet XL Canny generates a new image that follows the outlines of a Canny edge map while taking its style, mood and content from a text prompt.

It is a ControlNet adapter on SDXL: rather than letting the model invent a layout, you hand it the edge structure of a reference photo, a sketch or line art, and it fills in the rest.

When to use it

  • Keeping a reference image's exact layout while changing everything else
  • Turning a hand-drawn sketch or clean line art into a rendered image
  • Restyling a scene in watercolor or anime without losing its geometry
  • Alternate renderings of a building or product with structural lines kept
  • Edge fidelity beyond what the general Union variant holds to

Details

  • CategoryImg2Img
  • Year2024
  • LicenseApache-2.0

Compliance & Provenance

  • ProviderOpen-source (xinsir) · Specialized
  • EU AI Act RiskMinimal Risk
  • Art. 50 TransparencyNot applicable

Inputs & Outputs

Canny Edge MapInputimage

Canny edge map produced by the Annotator-CannyEdge node. White edges on black background. The control image is resized to match the output resolution. The control image can be up to 1024×1024.

TextInputstring

Text prompt describing the desired output image. SDXL responds best to detailed English prompts. Include subject, style, lighting, and mood.

ImageOutputimage

Generated image whose structure follows the canny edges, guided by the text prompt.

Parameters

controlnet_conditioning_scalefloatdefault 1range 0–2

Edge guidance strength (0 = ignore, 2 = strict). 0.8–1.2 typical.

stepsintegerdefault 25range 20–30

Diffusion steps (20–30).

guidance_scalefloatdefault 5range 1–20

CFG scale (1–20, 5.0–7.5 typical for SDXL).

seedintegerdefault -1range -1–2147483647

Random seed (-1 = random).

widthintegerdefault 1024options: 512, 768, 1024

Output width (px). Edge map resized to match.

heightintegerdefault 1024options: 512, 768, 1024

Output height (px). Edge map resized to match.

negative_promptstringdefault advanced

Negative prompt — what to avoid. Empty for none.

Tags

  • controlnet
  • image-control
  • sdxl
  • guided-generation
  • canny
  • edge-detection
  • apache-2.0

Alternatives in Image Control

  • ControlNet XL Union

    Guided SDXL image generation from a control image + text prompt. One model, 6 modes: canny, depth, openpose, hed, normal, segment. Outputs up to 1024×1024.

  • Depth Anything Annotator

    Monocular depth estimation (Depth Anything V1 Large).

Resources

All AI models