Downloads · 30 days
175
67% of all-time downloads
SCCCCCSC/controlnet-openpose-sdxl-1.0
controlnet-openpose-sdxl-1.0 is a text-to-image model from SCCCCCSC. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as other.
These are controlnet weights trained on stabilityai/stable-diffusion-xl-base-1.0 with OpenPose (v2) conditioning. You can find some example images in the following.
Downloads · 30 days
175
67% of all-time downloads
All-time downloads
262
Public
Repo size
10.8 GB
Likes
0
Public
Click a slice to open those files.
.safetensors5.8 GB · 54%
From the Hugging Face model README
These are controlnet weights trained on stabilityai/stable-diffusion-xl-base-1.0 with OpenPose (v2) conditioning. You can find some example images in the following.
prompt: a ballerina, romantic sunset, 4k photo


(Image is from ComfyUI, you can drag and drop in Comfy to use it as workflow)
License: refers to the OpenPose's one.
First, install all the libraries:
pip install -q controlnet_aux transformers accelerate
pip install -q git+https://github.com/huggingface/diffusers
Now, we're ready to make Darth Vader dance:
from diffusers import AutoencoderKL, StableDiffusionXLControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
import torch
from controlnet_aux import OpenposeDetector
from diffusers.utils import load_image
# Compute openpose conditioning image.
openpose = OpenposeDetector.from_pretrained("lllyasviel/ControlNet")
image = load_image(
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/person.png"
)
openpose_image = openpose(image)
# Initialize ControlNet pipeline.
controlnet = ControlNetModel.from_pretrained("thibaud/controlnet-openpose-sdxl-1.0", torch_dtype=torch.float16)
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet, torch_dtype=torch.float16
)
pipe.enable_model_cpu_offload()
# Infer.
prompt = "Darth vader dancing in a desert, high quality"
negative_prompt = "low quality, bad quality"
images = pipe(
prompt,
negative_prompt=negative_prompt,
num_inference_steps=25,
num_images_per_prompt=4,
image=openpose_image.resize((1024, 1024)),
generator=torch.manual_seed(97),
).images
images[0]
Here are some gemerated examples:

Use of the training script by HF🤗 here.
This checkpoint was first trained for 15,000 steps on laion 6a resized to a max minimum dimension of 768.
one 1xA100 machine (Thanks a lot HF🤗 to provide the compute!)
Data parallel with a single gpu batch size of 2 with gradient accumulation 8.
Constant learning rate of 8e-5
fp16