hysts HF staff commited on
Commit
591b7a6
1 Parent(s): a8852a3
Files changed (1) hide show
  1. model.py +4 -4
model.py CHANGED
@@ -419,7 +419,7 @@ class Model:
419
  control_image = cv2.resize(control_image, (W, H),
420
  interpolation=cv2.INTER_NEAREST)
421
  else:
422
- control_image = input_image
423
 
424
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
425
  control_image)
@@ -473,7 +473,7 @@ class Model:
473
  control_image = cv2.resize(control_image, (W, H),
474
  interpolation=cv2.INTER_NEAREST)
475
  else:
476
- control_image = input_image
477
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
478
  control_image)
479
 
@@ -527,7 +527,7 @@ class Model:
527
  control_image = cv2.resize(control_image, (W, H),
528
  interpolation=cv2.INTER_LINEAR)
529
  else:
530
- control_image = input_image
531
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
532
  control_image)
533
 
@@ -583,7 +583,7 @@ class Model:
583
  control_image = cv2.resize(control_image, (W, H),
584
  interpolation=cv2.INTER_LINEAR)
585
  else:
586
- control_image = input_image
587
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
588
  control_image)
589
 
 
419
  control_image = cv2.resize(control_image, (W, H),
420
  interpolation=cv2.INTER_NEAREST)
421
  else:
422
+ control_image = resize_image(input_image, image_resolution)
423
 
424
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
425
  control_image)
 
473
  control_image = cv2.resize(control_image, (W, H),
474
  interpolation=cv2.INTER_NEAREST)
475
  else:
476
+ control_image = resize_image(input_image, image_resolution)
477
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
478
  control_image)
479
 
 
527
  control_image = cv2.resize(control_image, (W, H),
528
  interpolation=cv2.INTER_LINEAR)
529
  else:
530
+ control_image = resize_image(input_image, image_resolution)
531
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
532
  control_image)
533
 
 
583
  control_image = cv2.resize(control_image, (W, H),
584
  interpolation=cv2.INTER_LINEAR)
585
  else:
586
+ control_image = resize_image(input_image, image_resolution)
587
  return PIL.Image.fromarray(control_image), PIL.Image.fromarray(
588
  control_image)
589