<aside> ๐
SDXL Image Generation Guided by a Canny Edge Map
High-fidelity image generation from a canny edge map + text prompt using SDXL. A dedicated canny ControlNet, sharper structural adherence than the general-purpose Union variant for edge-based tasks. Pair with the Canny Edge Annotator to turn a source photo into the edge map this model expects.
</aside>
ControlNet XL Canny generates a new image that matches the outlines of a canny edge map while following a text prompt for the style, mood, and content. It is a ControlNet adapter on top of Stable Diffusion XL (SDXL): instead of leaving SDXL to imagine the layout from scratch, you give it the edge structure of a reference photo (or a sketch / line art), and SDXL fills in the rest. The result is image generation with strong structural control, same composition, completely new style. This is a dedicated canny model (trained only for canny), which gives sharper structural adherence than the more general ControlNet-Union variant on edge-based tasks. The xinsir release was trained on 10M+ carefully captioned images and outperforms other open-source canny models (diffusers/controlnet-canny-sdxl-1.0, TheMistoAI/MistoLine) on both aesthetic score and perceptual control.
| Output resolution | Up to 1024 ร 1024 (native SDXL) |
| VRAM requirement | ~8 GB |
| Default diffusion steps | 25 (20 โ 30 gives good quality) |
| Aesthetic score (Laion) | 6.03 โ best vs. diffusers/controlnet-canny-sdxl-1.0 (5.93) and TheMistoAI/MistoLine (5.82) |
| Perceptual similarity (lower = better control) | 0.4200 โ best vs. diffusers/controlnet-canny-sdxl-1.0 (0.5053) and TheMistoAI/MistoLine (0.5387) |
| Strength vs. Union variant | Sharper structural adherence on edge-based tasks (dedicated canny model) |
| Model type | ControlNet adapter for SDXL (canny-conditioned) |
| Base model | stabilityai/stable-diffusion-xl-base-1.0 |
| Conditioning input | Canny edge map (grayscale) |
| Architecture | ControlNet (Zhang et al., 2023) on the SDXL UNet |
| Training data | 10M+ carefully filtered & captioned images (Midjourney, LAION-5B, Danbooru, etc.) |
| Captioning model | CogVLM (for general images); WD tagger (for anime/comic images) |
| Training compute | 64+ NVIDIA A100s, effective batch size 2,560 (single-stage training, multi-resolution) |
| Tricks used in training | Data augmentation, multiple loss, multi-resolution, random masking on canny inputs |
| Recommended VAE | madebyollin/sdxl-vae-fp16-fix |
| Supported Frameworks | Hugging Face Diffusers (StableDiffusionXLControlNetPipeline, ControlNetModel), Safetensors |