hirol commited on
Commit
2db2ca7
1 Parent(s): a637d5e

Update generate_img.py

Browse files
Files changed (1) hide show
  1. generate_img.py +3 -3
generate_img.py CHANGED
@@ -6,7 +6,7 @@ from pipeline_stable_diffusion_controlnet_inpaint import *
6
  from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet import *
7
  import random
8
  #model1
9
- controlnet = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_openpose", torch_dtype=torch.float16,cache_dir='./models')
10
  pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained(
11
  "./models/Any-inpainting", controlnet=controlnet, torch_dtype=torch.float16,cache_dir='./models'
12
  )
@@ -15,10 +15,10 @@ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
15
  pipe.to('cuda')
16
 
17
  # model2
18
- controlnet1 = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_scribble",torch_dtype=torch.float16,cache_dir='./models')
19
 
20
  pipe1 = StableDiffusionControlNetInpaintPipeline.from_pretrained(
21
- "./models/Any-inpainting", controlnet=controlnet1, torch_dtype=torch.float16,cache_dir='./models'
22
  )
23
 
24
  pipe1.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
 
6
  from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet import *
7
  import random
8
  #model1
9
+ controlnet = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_openpose", torch_dtype=torch.float16)
10
  pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained(
11
  "./models/Any-inpainting", controlnet=controlnet, torch_dtype=torch.float16,cache_dir='./models'
12
  )
 
15
  pipe.to('cuda')
16
 
17
  # model2
18
+ controlnet1 = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_scribble",torch_dtype=torch.float16)
19
 
20
  pipe1 = StableDiffusionControlNetInpaintPipeline.from_pretrained(
21
+ "./models/Any-inpainting", controlnet=controlnet1, torch_dtype=torch.float16
22
  )
23
 
24
  pipe1.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)