Update app.py
Browse files
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
|
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 =
|
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)
|