mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-16 11:50:35 +08:00
fix vllm
This commit is contained in:
@@ -82,7 +82,7 @@ class BasePlugin:
|
||||
Pre-processes a single image.
|
||||
"""
|
||||
image_resolution: int = kwargs.get("image_resolution")
|
||||
if image.width * image.height > image_resolution:
|
||||
if (image.width * image.height) > image_resolution:
|
||||
resize_factor = math.sqrt(image_resolution / (image.width * image.height))
|
||||
width, height = int(image.width * resize_factor), int(image.height * resize_factor)
|
||||
image = image.resize((width, height), resample=Image.NEAREST)
|
||||
|
||||
Reference in New Issue
Block a user