cloth_controlnet / README.md
Docty's picture
Update README.md
04c5c6d verified
|
raw
history blame
1.61 kB
metadata
base_model: stable-diffusion-v1-5/stable-diffusion-v1-5
inference: true
license: mit
library_name: diffusers
instance_prompt: >-
  a professional studio photograph of an attractive model wearing a teal top
  with lace detail
tags:
  - stable-diffusion
  - stable-diffusion-diffusers
  - text-to-image
  - diffusers
  - controlnet
  - diffusers-training

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.

img_0 img_1 img_2

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
)

control_image = load_image("/kaggle/input/netcontroldataset/netcontrol/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