Alpha-VLLM / Lumina-T2X

Lumina-T2X is a unified framework for Text to Any Modality Generation
MIT License
1.82k stars 74 forks source link

Got Unpickling error when sampling lumina_next_t2i #64

Open yjhong89 opened 2 weeks ago

yjhong89 commented 2 weeks ago

Hi!

According to https://github.com/Alpha-VLLM/Lumina-T2X/tree/main/lumina_next_t2i#inference,

FutureWarning: `Transformer2DModelOutput` is deprecated and will be removed in version 1.0.0. Importing `Transformer2DModelOutput` from `diffusers.models.transformer_2d` is deprecated and this will be removed in a future version. Please use `from diffusers.models.modeling_outputs import Transformer2DModelOutput`, instead.
  deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message)
/home/Lumina-T2X/lumina_next_t2i/models/components.py:9: UserWarning: Cannot import apex RMSNorm, switch to vanilla implementation
  warnings.warn("Cannot import apex RMSNorm, switch to vanilla implementation")
> initializing model parallel with size 1
> initializing ddp with size 1
> initializing pipeline with size 1
Traceback (most recent call last):
  File "/home/Lumina-T2X/lumina_next_t2i/sample.py", line 326, in <module>
    main(args, 0, master_port)
  File "/home/Lumina-T2X/lumina_next_t2i/sample.py", line 95, in main
    train_args = torch.load(os.path.join(args.ckpt, "model_args.pth"))
  File "/home/.conda/envs/lumina_t2x/lib/python3.10/site-packages/torch/serialization.py", line 815, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/.conda/envs/lumina_t2x/lib/python3.10/site-packages/torch/serialization.py", line 1033, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
PommesPeter commented 2 weeks ago

Hi @yjhong89 Could you give more details about your environment? (e.g. conda environment, hardware setup, etc.)

PommesPeter commented 2 weeks ago

It appears that the model_args.pth file is incomplete. Please check if the size of the model_args.pth file is correct.