YiYiXu commited on
Commit
fd017de
·
verified ·
1 Parent(s): a0a72b9

Update block.py

Browse files
Files changed (1) hide show
  1. block.py +2 -2
block.py CHANGED
@@ -54,8 +54,8 @@ class Wan14BImageProcessor(PipelineBlock):
54
  max_area = block_state.max_area
55
 
56
  aspect_ratio = image.height / image.width
57
- mod_value_height = pipe.vae_stride[1] * components.patch_size[1]
58
- mod_value_width = pipe.vae_stride[2] * components.patch_size[2]
59
  height = round(np.sqrt(max_area * aspect_ratio)) // mod_value_height * mod_value_height
60
  width = round(np.sqrt(max_area / aspect_ratio)) // mod_value_width * mod_value_width
61
  resized_image = image.resize((width, height))
 
54
  max_area = block_state.max_area
55
 
56
  aspect_ratio = image.height / image.width
57
+ mod_value_height = components.vae_stride[1] * components.patch_size[1]
58
+ mod_value_width = components.vae_stride[2] * components.patch_size[2]
59
  height = round(np.sqrt(max_area * aspect_ratio)) // mod_value_height * mod_value_height
60
  width = round(np.sqrt(max_area / aspect_ratio)) // mod_value_width * mod_value_width
61
  resized_image = image.resize((width, height))