Skip to content

vllm.transformers_utils.processors.glm4v

GLM4VImageProcessorFast

Bases: BaseImageProcessorFast

Port of https://huggingface.co/zai-org/glm-4v-9b/blob/main/tokenization_chatglm.py#L177 to HF Transformers.

Source code in vllm/transformers_utils/processors/glm4v.py
class GLM4VImageProcessorFast(BaseImageProcessorFast):
    """
    Port of https://huggingface.co/zai-org/glm-4v-9b/blob/main/tokenization_chatglm.py#L177
    to HF Transformers.
    """

    resample = PILImageResampling.BICUBIC
    image_mean = [0.48145466, 0.4578275, 0.40821073]
    image_std = [0.26862954, 0.26130258, 0.27577711]
    size = {"height": 1120, "width": 1120}
    do_resize = True
    do_rescale = True
    do_normalize = True