Spaces:
Runtime error
Runtime error
Update diffusion_webui/diffusion_models/controlnet/controlnet_seg.py
Browse files
diffusion_webui/diffusion_models/controlnet/controlnet_seg.py
CHANGED
@@ -203,7 +203,7 @@ class StableDiffusionControlNetSegGenerator:
|
|
203 |
"openmmlab/upernet-convnext-small"
|
204 |
)
|
205 |
|
206 |
-
image = image_path
|
207 |
pixel_values = image_processor(image, return_tensors="pt").pixel_values
|
208 |
|
209 |
with torch.no_grad():
|
|
|
203 |
"openmmlab/upernet-convnext-small"
|
204 |
)
|
205 |
|
206 |
+
image = Image.open(image_path).convert("RGB")
|
207 |
pixel_values = image_processor(image, return_tensors="pt").pixel_values
|
208 |
|
209 |
with torch.no_grad():
|