Spaces:
Running
Running
Update diffusion_webui/diffusion_models/controlnet_pipeline.py
Browse files
diffusion_webui/diffusion_models/controlnet_pipeline.py
CHANGED
@@ -71,8 +71,13 @@ class StableDiffusionControlNetGenerator(ControlnetPipeline):
|
|
71 |
controlnet_model_path=controlnet_model_path,
|
72 |
scheduler=scheduler,
|
73 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
read_image = cv2.imread(image_path)
|
76 |
controlnet_image = self.controlnet_preprocces(
|
77 |
read_image=read_image, preprocces_type=preprocces_type
|
78 |
)[0]
|
@@ -83,7 +88,6 @@ class StableDiffusionControlNetGenerator(ControlnetPipeline):
|
|
83 |
else:
|
84 |
generator = torch.manual_seed(seed_generator)
|
85 |
|
86 |
-
controlnet_image = Image.fromarray(controlnet_image)
|
87 |
|
88 |
output = pipe(
|
89 |
prompt=prompt,
|
|
|
71 |
controlnet_model_path=controlnet_model_path,
|
72 |
scheduler=scheduler,
|
73 |
)
|
74 |
+
if preprocces_type== "ScribbleXDOG":
|
75 |
+
read_image = cv2.imread(image_path)
|
76 |
+
controlnet_image = Image.fromarray(read_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]
|
|
|
88 |
else:
|
89 |
generator = torch.manual_seed(seed_generator)
|
90 |
|
|
|
91 |
|
92 |
output = pipe(
|
93 |
prompt=prompt,
|