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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 DiffusionPipeline, ControlNetModel
21
  from diffusers import UniPCMultistepScheduler
22
 
23
  import cv2
@@ -48,7 +48,7 @@ high_threshold = 200
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, safety_checker=None, torch_dtype=torch.float16
53
  )
54
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
 
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
 
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)