Skip to content

Problem about hunyuan worldplay pipeline #131

@hzeroyuke

Description

@hzeroyuke

When running HunyuanWorldPlayPipeline.from_pretrained(...), the pipeline fails to load the ByT5 glyph processor with the following error:

RuntimeError: Error loading byT5 glyph processor

The root cause is a hard version check introduced in recent versions of transformers(4.57,3), which now requires PyTorch >= 2.6 (But docs/install.md requires torch==2.5.1 for hunyuan worldplay)to load .pt checkpoint files via torch.load, due to a serious security vulnerability

Traceback

File "hunyuan_worldplay_synthesis.py", line 397, in _load_byt5
    byt5_kwargs = load_glyph_byT5_v2(byt5_args, device=device)
  File "byT5/__init__.py", line 150, in load_byt5_and_byt5_tokenizer
    byt5_text_encoder = T5ForConditionalGeneration.from_pretrained(
  File "transformers/utils/import_utils.py", line 1647, in check_torch_load_is_safe
    raise ValueError(
ValueError: Due to a serious vulnerability issue in `torch.load`, even with
`weights_only=True`, we now require users to upgrade torch to at least v2.6
in order to use the function. This version restriction does not apply when
loading files with safetensors.
See: https://nvd.nist.gov/vuln/detail/CVE-2025-32434

Root Cause

checkpoints/HunyuanVideo-1.5/text_encoder/Glyph-SDXL-v2/checkpoints/byt5_model.pt is a legacy .pt (pickle) format file. The transformers library now blocks torch.load on .pt files for PyTorch < 2.6 as a security measure. The restriction does not apply to .safetensors format.

Steps to Reproduce

CUDA_VISIBLE_DEVICES=0 python test/test_hunyuan_worldplay.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions