Saltar al contenido
ModelPublicadoExterno
Descargar

Sd21 ControlNet Canny

Converted Canny SD 2.1-base model from to diffusers format.

TipoControlNetVersióndiffusion_pytorch_modelBcalidad

Fuente del modelo

Tipo
ControlNet
Tamaño del archivo
695 MB
Versión
vdiffusion_pytorch_model
Actualizado
6 oct 2026
Descargas
18
Fuente
Hugging Face

Descripción de la fuente

Converted Canny SD 2.1-base model from https://huggingface.co/thibaud/controlnet-sd21/ to diffusers format.

Saved only ControlNet weights

Usage:

from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, DEISMultistepScheduler
import cv2
from PIL import Image
import numpy as np

pipe = StableDiffusionControlNetPipeline.from_pretrained(
    "stabilityai/stable-diffusion-2-1-base",
    safety_checker=None,
    # revision='fp16',
    # torch_dtype=torch.float16,
    controlnet=ControlNetModel.from_pretrained("thepowefuldeez/sd21-controlnet-canny")
).to('cuda')
pipe.scheduler = DEISMultistepScheduler.from_config(pipe.scheduler.config)

image = np.array(Image.open("10.png"))

low_threshold = 100
high_threshold = 200

image = cv2.Canny(image, low_threshold, high_threshold)
image = image[:, :, None]
image = np.concatenate([image, image, image], axis=2)
canny_image = Image.fromarray(image)

im = pipe(
    "beautiful woman", image=canny_image, num_inference_steps=30, 
    negative_prompt="ugly, blurry, bad, deformed, bad anatomy", 
    generator=torch.manual_seed(42)
).images[0]

Fuentes

1 fuente
Hugging FacePrincipalVersión dc4db28f9a1aa22cd90cc6b81eaab27656647d16
huggingface.co/thepowerfuldeez/sd21-controlnet-canny/tree/dc4db28f9a1aa22cd90cc6b81eaab27656647d16

Verificado 6 oct

Artefactos del modelo

1 artefacto

diffusion_pytorch_model.bin

bin · 695 MB · SHA-256 698bfe6ee0b0…a35d · Hugging Face

Download file

Extractos de fuentes

3 extractos

--- license: openrail --- Converted Canny SD 2.1-base model from https://huggingface.co/thibaud/controlnet-sd21/ to diffusers format. Saved only ControlNet weights Usage: ``` from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, DEISMultistepScheduler import cv2 from PIL import Image import numpy as np pipe = StableDiffusionControlNetPipeline.from_pretrained( "stabilityai/stable-diffusion-2-1-base", safety_checker=None, # revision='fp16', # torch_dtype=torch.float16, controlnet=ControlNetModel.from_pretrained("thepowefuldeez/sd21-controlnet-canny") ).to('cuda') pipe.scheduler = DEISMultistepScheduler.from_config(pipe.scheduler.config) image = np.array(Image.open("10.png")) low_threshold = 100 high_threshold = 200 image = cv2.Canny(image, low_threshold, high_threshold) image = image[:, :, None] image = np.concatenate([image, image, image], axis=2) canny_image = Image.fromarray(image) im = pipe( "beautiful woman", image=canny_image, num_inference_steps=30, negative_prompt="ugly, blurry, bad, deformed, bad anatomy", generator=torch.manual_seed(42) ).images[0] ```

Source context: 18 downloads · 7 likes · Library diffusers · Repo thepowerfuldeez/sd21-controlnet-canny

Source context: 8 downloads · 7 likes · Library diffusers · Repo thepowerfuldeez/sd21-controlnet-canny