Text-to-Image
Diffusers
TensorBoard
Safetensors
stable-diffusion
stable-diffusion-diffusers
controlnet
diffusers-training
Instructions to use Docty/cloth_controlnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Docty/cloth_controlnet with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("Docty/cloth_controlnet") pipe = StableDiffusionControlNetPipeline.from_pretrained( "stable-diffusion-v1-5/stable-diffusion-v1-5", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
ControlNet for cloth- Docty/cloth_controlnet
These are ControlNet for stable-diffusion-v1-5/stable-diffusion-v1-5. You can find some example images in the following.
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
from diffusers.utils import load_image
import torch
base_model_path = "stable-diffusion-v1-5/stable-diffusion-v1-5"
controlnet_path = "Docty/cloth_controlnet"
controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16)
pipe = StableDiffusionControlNetPipeline.from_pretrained(
base_model_path, controlnet=controlnet, torch_dtype=torch.float16
)
# speed up diffusion process with faster scheduler and memory optimization
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
# remove following line if xformers is not installed or when using Torch 2.0.
#pipe.enable_xformers_memory_efficient_attention()
# memory optimization.
pipe.enable_model_cpu_offload()
control_image = load_image("./cond1.jpg")
prompt = "a professional studio photograph of an attractive model wearing a teal top with lace detail"
# generate image
#generator = torch.manual_seed(0)
image = pipe(
prompt, num_inference_steps=20, image=control_image
).images[0]
image
- Downloads last month
- 3
Model tree for Docty/cloth_controlnet
Base model
stable-diffusion-v1-5/stable-diffusion-v1-5

