Alexander Bagus commited on
Commit
9dbd468
·
1 Parent(s): 85f26e6
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -99,7 +99,7 @@ def inference(
99
  print("Error: input_image is empty.")
100
  return None
101
 
102
- input_image, width, height = scale_image(input_image, image_scale)
103
  control_mode='HED'
104
 
105
  if control_mode == 'HED':
@@ -113,7 +113,8 @@ def inference(
113
  else:
114
  processor = Processor('canny')
115
 
116
- control_image = scale_image(input_image, image_scale, 64)
 
117
  control_image = processor(control_image, to_pil=True)
118
 
119
  control_image_torch = get_image_latent(control_image, sample_size=[height, width])[:, :, 0]
 
99
  print("Error: input_image is empty.")
100
  return None
101
 
102
+ # input_image, width, height = scale_image(input_image, image_scale)
103
  control_mode='HED'
104
 
105
  if control_mode == 'HED':
 
113
  else:
114
  processor = Processor('canny')
115
 
116
+ control_image, width, height = scale_image(input_image, image_scale, 64)
117
+ control_image = control_image.resize(512, 512)
118
  control_image = processor(control_image, to_pil=True)
119
 
120
  control_image_torch = get_image_latent(control_image, sample_size=[height, width])[:, :, 0]