possible bug in processing_step3.py?
#15
by
J22
- opened
Here new size is tested against outdated size of img :
https://huggingface.co/stepfun-ai/Step3-VL-10B/blob/main/processing_step3.py#L225
if (new_img_width, new_img_height) != (img_width, img_height):
img_for_crop = img.resize((new_img_width, new_img_height),
Image.Resampling.BILINEAR)
img has already been resized to new size at line 214. Is this intentional or a bug?
https://huggingface.co/stepfun-ai/Step3-VL-10B/blob/main/processing_step3.py#L214
We need to crop the new image based on the window size. Note that new_img_width on line 223 is different from the one on line 214.
On line 225, what is expected to be done:
if (new_img_width, new_img_height) != img.size:
img_for_crop = img.resize(....)
But now, size of img might not be equal to (img_width, img_height).