michaelj commited on
Commit
253e12a
1 Parent(s): aa03471
Files changed (1) hide show
  1. backend/lcm_text_to_image.py +7 -7
backend/lcm_text_to_image.py CHANGED
@@ -243,7 +243,7 @@ class LCMTextToImage:
243
  newH = int(h * newW / w)
244
  lcm_diffusion_setting.image_height=newH
245
  lcm_diffusion_setting.init_image = lcm_diffusion_setting.init_image.resize((newW, newH))
246
- print("修改图像尺寸了",newW,newH)
247
  img_to_img_inference_steps = lcm_diffusion_setting.inference_steps
248
  check_step_value = int(
249
  lcm_diffusion_setting.inference_steps * lcm_diffusion_setting.strength
@@ -270,12 +270,12 @@ class LCMTextToImage:
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=newH,
276
- # width=newW,
277
- # num_images_per_prompt=lcm_diffusion_setting.number_of_images,
278
- # )
279
  self.pipeline.compile()
280
 
281
  if self.is_openvino_init:
 
243
  newH = int(h * newW / w)
244
  lcm_diffusion_setting.image_height=newH
245
  lcm_diffusion_setting.init_image = lcm_diffusion_setting.init_image.resize((newW, newH))
246
+ print("修改图像尺寸了",lcm_diffusion_setting.image_height,lcm_diffusion_setting.image_width)
247
  img_to_img_inference_steps = lcm_diffusion_setting.inference_steps
248
  check_step_value = int(
249
  lcm_diffusion_setting.inference_steps * lcm_diffusion_setting.strength
 
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=newH,
276
+ width=newW,
277
+ num_images_per_prompt=lcm_diffusion_setting.number_of_images,
278
+ )
279
  self.pipeline.compile()
280
 
281
  if self.is_openvino_init: