-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
lmms-engine/src/lmms_engine/models/qwen2_5_vl/monkey_patch.py
Lines 134 to 139 in 0712fef
| if vision_model is not None: | |
| # Patch Qwen2_5_VisionTransformerPretrainedModel | |
| for vision_block in model.visual.blocks: | |
| if rms_norm: | |
| _patch_rms_norm_module(vision_block.norm1) | |
| _patch_rms_norm_module(vision_block.norm2) |
model.visual.blocks => vision_model.blocks
lmms-engine/src/lmms_engine/datasets/processor/qwen3_vl_processor.py
Lines 19 to 33 in 0712fef
| # Set image processor parameters | |
| image_max_pixels = self.config.extra_kwargs.get("image_max_pixels", None) | |
| image_min_pixels = self.config.extra_kwargs.get("image_min_pixels", None) | |
| if image_max_pixels: | |
| processor.image_processor.max_pixels = image_max_pixels | |
| if image_min_pixels: | |
| processor.image_processor.min_pixels = image_min_pixels | |
| # Set video processor parameters | |
| video_max_pixels = self.config.extra_kwargs.get("video_max_pixels", None) | |
| video_min_pixels = self.config.extra_kwargs.get("video_min_pixels", None) | |
| if video_max_pixels: | |
| processor.video_processor.max_pixels = video_max_pixels | |
| if video_min_pixels: | |
| processor.video_processor.min_pixels = video_min_pixels |
processor.image_processor.max_pixels will not be used in some transformers version
Metadata
Metadata
Assignees
Labels
No labels