kadirnar commited on
Commit
bf342c0
1 Parent(s): 3ceb86d

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["image"].convert("RGB").resize((512, 512))
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():