Files
enginex-mlu370-any2any/transformers/examples/modular-transformers/modular_new_imgproc_model.py

10 lines
286 B
Python
Raw Normal View History

2025-10-09 16:47:16 +08:00
import torch
import torch.utils.checkpoint
from transformers.models.blip.image_processing_blip import BlipImageProcessor
class ImgprocModelImageProcessor(BlipImageProcessor):
def new_image_processing_method(self, pixel_values: torch.FloatTensor):
return pixel_values / 2