SD15OpenPoseControlNetModel
DashAI.back.models.hugging_face.SD15OpenPoseControlNetModel
OpenPose-conditioned ControlNet pipeline built on Stable Diffusion 1.5.
Takes an input image and a text prompt. Human body keypoints and skeleton
structures are detected from the image using OpenposeDetector from
lllyasviel/Annotators, then fed as spatial conditioning into the
lllyasviel/sd-controlnet-openpose ControlNet backbone together with the
runwayml/stable-diffusion-v1-5 diffusion pipeline. This model is ideal
for generating images with specific human poses or body positions while
retaining full control over appearance via the text prompt.
Requires the controlnet_aux package (pip install controlnet_aux).
References
- [1] Zhang & Agrawala, "Adding Conditional Control to Text-to-Image Diffusion Models", ICCV 2023. https://arxiv.org/abs/2302.05543
- [2] https://huggingface.co/lllyasviel/sd-controlnet-openpose
Parameters
- num_inference_steps : integer, default=
20 - Number of denoising steps. Typical range: 20-30 for fast results, 40-50 for higher quality.
- controlnet_conditioning_scale : number, default=
1.0 - Weight of the ControlNet pose conditioning (range 0.0-2.0). At 1.0 the output closely follows the input pose. Lower values allow more creative freedom while preserving the general pose.
- guidance_scale : number, default=
7.5 - Classifier-Free Guidance (CFG) scale. Controls prompt adherence. Values 7-9 are typical for SD 1.5.
- device : string, default=
CPU - Hardware device for inference. GPU is strongly recommended for diffusion models. CPU inference is possible but very slow.
- gpu_memory_mode : string, default=
auto - How much of the model is kept on the GPU. 'auto' measures free VRAM when the model loads and picks the fastest option that fits. 'full' keeps everything on the GPU (fastest, most VRAM). 'model' moves one component (text encoder, denoiser, VAE) to the GPU at a time. 'sequential' streams the weights layer by layer: slowest, but runs large models on small GPUs. Ignored on CPU.