[Bugfix][HunyuanImage3] Align AR RGB conversion with official semantics (#4502)
Signed-off-by: TaffyOfficial <2324465096@qq.com> Co-authored-by: TaffyOfficial <2324465096@qq.com>
This commit is contained in:
1 parent
eaa16e1941
commit
f4d922d8f6
2 files changed
+56
-3
No files matched your search
@@ -68,7 +68,6 @@ from vllm.model_executor.models.utils import (
|
||||
maybe_prefix,
|
||||
)
|
||||
from vllm.multimodal import MULTIMODAL_REGISTRY
|
||||
from vllm.multimodal.image import rgba_to_rgb
|
||||
from vllm.multimodal.inputs import (
|
||||
MultiModalFeatureSpec,
|
||||
MultiModalFieldConfig,
|
||||
@@ -889,8 +888,8 @@ class HunyuanImage3Processor:
|
||||
for image in images:
|
||||
current_info = {}
|
||||
|
||||
if self.hf_config.vit["num_channels"] == 3 and image.mode == "RGBA":
|
||||
image = rgba_to_rgb(image, (255, 255, 255))
|
||||
if self.hf_config.vit["num_channels"] == 3 and image.mode != "RGB":
|
||||
image = image.convert("RGB")
|
||||
|
||||
# VIT processing
|
||||
vit_pixel_values = self.vision_encoder_processor(image)
|
||||
|
||||
Reference in new issue
Block a user