Spaces:
Runtime error
Runtime error
Update diffusion_webui/diffusion_models/controlnet_pipeline.py
Browse files
diffusion_webui/diffusion_models/controlnet_pipeline.py
CHANGED
|
@@ -73,14 +73,12 @@ class StableDiffusionControlNetGenerator(ControlnetPipeline):
|
|
| 73 |
)
|
| 74 |
if preprocces_type== "ScribbleXDOG":
|
| 75 |
read_image = cv2.imread(image_path)
|
| 76 |
-
controlnet_image =
|
|
|
|
| 77 |
|
| 78 |
else:
|
| 79 |
read_image = Image.open(image_path)
|
| 80 |
-
|
| 81 |
-
controlnet_image = self.controlnet_preprocces(
|
| 82 |
-
read_image=read_image, preprocces_type=preprocces_type
|
| 83 |
-
)[0]
|
| 84 |
|
| 85 |
if seed_generator == 0:
|
| 86 |
random_seed = torch.randint(0, 1000000, (1,))
|
|
|
|
| 73 |
)
|
| 74 |
if preprocces_type== "ScribbleXDOG":
|
| 75 |
read_image = cv2.imread(image_path)
|
| 76 |
+
controlnet_image = self.controlnet_preprocces(read_image=read_image, preprocces_type=preprocces_type)[0]
|
| 77 |
+
controlnet_image = Image.fromarray(controlnet_image)
|
| 78 |
|
| 79 |
else:
|
| 80 |
read_image = Image.open(image_path)
|
| 81 |
+
controlnet_image = self.controlnet_preprocces(read_image=read_image, preprocces_type=preprocces_type)
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
if seed_generator == 0:
|
| 84 |
random_seed = torch.randint(0, 1000000, (1,))
|