fffiloni commited on
Commit
f6486fd
·
1 Parent(s): 6f9899e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,7 +17,7 @@ using our implementation of the RAFT model. We will also see how to convert the
17
  predicted flows to RGB images for visualization.
18
  """
19
 
20
- from diffusers import StableDiffusionControlNetImg2ImgPipeline, ControlNetModel
21
  from diffusers import UniPCMultistepScheduler
22
 
23
  import cv2
@@ -48,8 +48,8 @@ high_threshold = 200
48
 
49
  # Models
50
  controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16)
51
- pipe = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
52
- "runwayml/stable-diffusion-v1-5", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16
53
  )
54
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
55
 
 
17
  predicted flows to RGB images for visualization.
18
  """
19
 
20
+ from diffusers import DiffusionPipeline, ControlNetModel
21
  from diffusers import UniPCMultistepScheduler
22
 
23
  import cv2
 
48
 
49
  # Models
50
  controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16)
51
+ pipe = DiffusionPipeline.from_pretrained(
52
+ "runwayml/stable-diffusion-v1-5", controlnet=controlnet, custom_pipeline="stable_diffusion_controlnet_img2img", safety_checker=None, torch_dtype=torch.float16
53
  )
54
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
55