HighCWu commited on
Commit
6ea80c4
1 Parent(s): 880dcdc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -3
README.md CHANGED
@@ -37,7 +37,6 @@ from PIL import Image
37
  from diffusers import StableDiffusionControlNetPipeline, UNet2DConditionModel, UniPCMultistepScheduler
38
  import torch
39
  from PIL import Image
40
- from diffusers.utils import load_image
41
  from models.controllora import ControlLoRAModel
42
 
43
  image = Image.open('<Your Conditioning Image Path>')
@@ -45,13 +44,13 @@ image = Image.open('<Your Conditioning Image Path>')
45
  unet = UNet2DConditionModel.from_pretrained(
46
  "runwayml/stable-diffusion-v1-5", subfolder="unet"
47
  )
48
- controllora = ControlLoRA.from_pretrained(
49
  "HighCWu/HighCWu/sd-controllora-face-landmarks", torch_dtype=torch.float16
50
  )
51
  controllora.tie_weights(unet)
52
 
53
  pipe = StableDiffusionControlNetPipeline.from_pretrained(
54
- "runwayml/stable-diffusion-v1-5", unet=unet, controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16
55
  )
56
 
57
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
 
37
  from diffusers import StableDiffusionControlNetPipeline, UNet2DConditionModel, UniPCMultistepScheduler
38
  import torch
39
  from PIL import Image
 
40
  from models.controllora import ControlLoRAModel
41
 
42
  image = Image.open('<Your Conditioning Image Path>')
 
44
  unet = UNet2DConditionModel.from_pretrained(
45
  "runwayml/stable-diffusion-v1-5", subfolder="unet"
46
  )
47
+ controllora = ControlLoRAModel.from_pretrained(
48
  "HighCWu/HighCWu/sd-controllora-face-landmarks", torch_dtype=torch.float16
49
  )
50
  controllora.tie_weights(unet)
51
 
52
  pipe = StableDiffusionControlNetPipeline.from_pretrained(
53
+ "runwayml/stable-diffusion-v1-5", unet=unet, controlnet=controllora, safety_checker=None, torch_dtype=torch.float16
54
  )
55
 
56
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)