change shape
Browse files
backend/lcm_text_to_image.py
CHANGED
@@ -93,12 +93,12 @@ class LCMTextToImage:
|
|
93 |
lcm_lora: LCMLora = lcm_diffusion_setting.lcm_lora
|
94 |
ov_model_id = lcm_diffusion_setting.openvino_lcm_model_id
|
95 |
|
96 |
-
if lcm_diffusion_setting.diffusion_task == DiffusionTask.image_to_image.value:
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
if (
|
104 |
self.pipeline is None
|
@@ -269,11 +269,10 @@ class LCMTextToImage:
|
|
269 |
print("Using OpenVINO")
|
270 |
if reshape and not self.is_openvino_init:
|
271 |
print("Reshape and compile,调整尺寸")
|
272 |
-
|
273 |
self.pipeline.reshape(
|
274 |
batch_size=-1,
|
275 |
-
height=
|
276 |
-
width=
|
277 |
num_images_per_prompt=lcm_diffusion_setting.number_of_images,
|
278 |
)
|
279 |
self.pipeline.compile()
|
|
|
93 |
lcm_lora: LCMLora = lcm_diffusion_setting.lcm_lora
|
94 |
ov_model_id = lcm_diffusion_setting.openvino_lcm_model_id
|
95 |
|
96 |
+
# if lcm_diffusion_setting.diffusion_task == DiffusionTask.image_to_image.value:
|
97 |
+
# lcm_diffusion_setting.init_image = resize_pil_image(
|
98 |
+
# lcm_diffusion_setting.init_image,
|
99 |
+
# lcm_diffusion_setting.image_width,
|
100 |
+
# lcm_diffusion_setting.image_height,
|
101 |
+
# )
|
102 |
|
103 |
if (
|
104 |
self.pipeline is None
|
|
|
269 |
print("Using OpenVINO")
|
270 |
if reshape and not self.is_openvino_init:
|
271 |
print("Reshape and compile,调整尺寸")
|
|
|
272 |
self.pipeline.reshape(
|
273 |
batch_size=-1,
|
274 |
+
height=lcm_diffusion_setting.image_height,
|
275 |
+
width=lcm_diffusion_setting.image_width,
|
276 |
num_images_per_prompt=lcm_diffusion_setting.number_of_images,
|
277 |
)
|
278 |
self.pipeline.compile()
|