Spaces:
Sleeping
Sleeping
upd
Browse files
app.py
CHANGED
|
@@ -30,9 +30,9 @@ def process_image(input_image: Image.Image, to_grayscale: bool, prompt: str) ->
|
|
| 30 |
output_image = remove_background(input_image, to_grayscale)
|
| 31 |
canny_output = canny_image(output_image)
|
| 32 |
|
| 33 |
-
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.
|
| 34 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 35 |
-
"runwayml/stable-diffusion-v1-5", controlnet=controlnet, torch_dtype=torch.
|
| 36 |
)
|
| 37 |
pipe.enable_model_cpu_offload()
|
| 38 |
|
|
|
|
| 30 |
output_image = remove_background(input_image, to_grayscale)
|
| 31 |
canny_output = canny_image(output_image)
|
| 32 |
|
| 33 |
+
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.float32)
|
| 34 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 35 |
+
"runwayml/stable-diffusion-v1-5", controlnet=controlnet, torch_dtype=torch.float32
|
| 36 |
)
|
| 37 |
pipe.enable_model_cpu_offload()
|
| 38 |
|