mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00
10 lines
286 B
Python
10 lines
286 B
Python
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
|