mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
[chore] make transformers version check stricter for glm image. (#12974)
* make transformers version check stricter for glm image. * public checkpoint.
This commit is contained in:
@@ -36,7 +36,7 @@ from .pipeline_output import GlmImagePipelineOutput
|
||||
# Because it's not released in stable as of 13/01/2026. So this is just a proxy.
|
||||
GlmImageProcessor = ProcessorMixin
|
||||
GlmImageForConditionalGeneration = PreTrainedModel
|
||||
if is_transformers_version(">=", "4.57.4"):
|
||||
if is_transformers_version(">=", "5.0.0.dev0"):
|
||||
from transformers import GlmImageForConditionalGeneration, GlmImageProcessor
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from ..pipeline_params import TEXT_TO_IMAGE_BATCH_PARAMS, TEXT_TO_IMAGE_IMAGE_PA
|
||||
from ..test_pipelines_common import PipelineTesterMixin
|
||||
|
||||
|
||||
if is_transformers_version(">=", "4.57.4"):
|
||||
if is_transformers_version(">=", "5.0.0.dev0"):
|
||||
from transformers import GlmImageConfig, GlmImageForConditionalGeneration, GlmImageProcessor
|
||||
|
||||
|
||||
@@ -86,8 +86,7 @@ class GlmImagePipelineFastTests(PipelineTesterMixin, unittest.TestCase):
|
||||
torch.manual_seed(0)
|
||||
vision_language_encoder = GlmImageForConditionalGeneration(glm_config)
|
||||
|
||||
# TODO: move to a public checkpoint
|
||||
processor = GlmImageProcessor.from_pretrained("ZP2Test/GLM-Image", subfolder="processor")
|
||||
processor = GlmImageProcessor.from_pretrained("zai-org/GLM-Image", subfolder="processor")
|
||||
|
||||
torch.manual_seed(0)
|
||||
# For GLM-Image, the relationship between components must satisfy:
|
||||
|
||||
Reference in New Issue
Block a user