diffusers / controlnet-canny-sdxl-1.0

huggingface.co
Total runs: 17.6K
24-hour runs: 170
7-day runs: -2.6K
30-day runs: -6.2K
Model's Last Updated: September 19 2023
text-to-image

Introduction of controlnet-canny-sdxl-1.0

Model Details of controlnet-canny-sdxl-1.0

SDXL-controlnet: Canny

These are controlnet weights trained on stabilityai/stable-diffusion-xl-base-1.0 with canny conditioning. You can find some example images in the following.

prompt: a couple watching a romantic sunset, 4k photo images_0)

prompt: ultrarealistic shot of a furry blue bird images_1)

prompt: a woman, close up, detailed, beautiful, street photography, photorealistic, detailed, Kodak ektar 100, natural, candid shot images_2)

prompt: Cinematic, neoclassical table in the living room, cinematic, contour, lighting, highly detailed, winter, golden hour images_3)

prompt: a tornado hitting grass field, 1980's film grain. overcast, muted colors. images_0)

Usage

Make sure to first install the libraries:

pip install accelerate transformers safetensors opencv-python diffusers

And then we're ready to go:

from diffusers import ControlNetModel, StableDiffusionXLControlNetPipeline, AutoencoderKL
from diffusers.utils import load_image
from PIL import Image
import torch
import numpy as np
import cv2

prompt = "aerial view, a futuristic research complex in a bright foggy jungle, hard lighting"
negative_prompt = 'low quality, bad quality, sketches'

image = load_image("https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd_controlnet/hf-logo.png")

controlnet_conditioning_scale = 0.5  # recommended for good generalization

controlnet = ControlNetModel.from_pretrained(
    "diffusers/controlnet-canny-sdxl-1.0",
    torch_dtype=torch.float16
)
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
    "stabilityai/stable-diffusion-xl-base-1.0",
    controlnet=controlnet,
    vae=vae,
    torch_dtype=torch.float16,
)
pipe.enable_model_cpu_offload()

image = np.array(image)
image = cv2.Canny(image, 100, 200)
image = image[:, :, None]
image = np.concatenate([image, image, image], axis=2)
image = Image.fromarray(image)

images = pipe(
    prompt, negative_prompt=negative_prompt, image=image, controlnet_conditioning_scale=controlnet_conditioning_scale,
    ).images

images[0].save(f"hug_lab.png")

images_10)

To more details, check out the official documentation of StableDiffusionXLControlNetPipeline .

Training

Our training script was built on top of the official training script that we provide here .

Training data

This checkpoint was first trained for 20,000 steps on laion 6a resized to a max minimum dimension of 384. It was then further trained for 20,000 steps on laion 6a resized to a max minimum dimension of 1024 and then filtered to contain only minimum 1024 images. We found the further high resolution finetuning was necessary for image quality.

Compute

one 8xA100 machine

Batch size

Data parallel with a single gpu batch size of 8 for a total batch size of 64.

Hyper Parameters

Constant learning rate of 1e-4 scaled by batch size for total learning rate of 64e-4

Mixed precision

fp16

Runs of diffusers controlnet-canny-sdxl-1.0 on huggingface.co

17.6K
Total runs
170
24-hour runs
-1.6K
3-day runs
-2.6K
7-day runs
-6.2K
30-day runs

More Information About controlnet-canny-sdxl-1.0 huggingface.co Model

More controlnet-canny-sdxl-1.0 license Visit here:

https://choosealicense.com/licenses/openrail++

controlnet-canny-sdxl-1.0 huggingface.co

controlnet-canny-sdxl-1.0 huggingface.co is an AI model on huggingface.co that provides controlnet-canny-sdxl-1.0's model effect (), which can be used instantly with this diffusers controlnet-canny-sdxl-1.0 model. huggingface.co supports a free trial of the controlnet-canny-sdxl-1.0 model, and also provides paid use of the controlnet-canny-sdxl-1.0. Support call controlnet-canny-sdxl-1.0 model through api, including Node.js, Python, http.

controlnet-canny-sdxl-1.0 huggingface.co Url

https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0

diffusers controlnet-canny-sdxl-1.0 online free

controlnet-canny-sdxl-1.0 huggingface.co is an online trial and call api platform, which integrates controlnet-canny-sdxl-1.0's modeling effects, including api services, and provides a free online trial of controlnet-canny-sdxl-1.0, you can try controlnet-canny-sdxl-1.0 online for free by clicking the link below.

diffusers controlnet-canny-sdxl-1.0 online free url in huggingface.co:

https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0

controlnet-canny-sdxl-1.0 install

controlnet-canny-sdxl-1.0 is an open source model from GitHub that offers a free installation service, and any user can find controlnet-canny-sdxl-1.0 on GitHub to install. At the same time, huggingface.co provides the effect of controlnet-canny-sdxl-1.0 install, users can directly use controlnet-canny-sdxl-1.0 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

controlnet-canny-sdxl-1.0 install url in huggingface.co:

https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0

Url of controlnet-canny-sdxl-1.0

controlnet-canny-sdxl-1.0 huggingface.co Url

Provider of controlnet-canny-sdxl-1.0 huggingface.co

diffusers
ORGANIZATIONS

Other API from diffusers

huggingface.co

Total runs: 46.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 22 2024
huggingface.co

Total runs: 3.0K
Run Growth: 119
Growth Rate: 3.93%
Updated:February 08 2023
huggingface.co

Total runs: 645
Run Growth: 125
Growth Rate: 19.38%
Updated:February 24 2025
huggingface.co

Total runs: 47
Run Growth: 16
Growth Rate: 34.04%
Updated:January 27 2023
huggingface.co

Total runs: 16
Run Growth: 10
Growth Rate: 62.50%
Updated:February 07 2024