Error when loading model
Loading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s]The config attributes {'guidance_embeds': False, 'qk_norm': 'rms_norm_across_heads'} were passed to SanaTransformer2DModel, but are not expected and will be ignored. Please verify your config.json configuration file.
Loading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/.../exp/generator/full_generator.py", line 67, in
fire.Fire(main)
File "/home/.../.local/lib/python3.11/site-packages/fire/core.py", line 135, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../.local/lib/python3.11/site-packages/fire/core.py", line 468, in _Fire
component, remaining_args = _CallAndUpdateTrace(
^^^^^^^^^^^^^^^^^^^^
File "/home/.../.local/lib/python3.11/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../exp/generator/full_generator.py", line 35, in main
pipeline = FullPipeline(model_name, parallelize, device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../exp/image_gen/full_pipeline.py", line 26, in init
self.model, self.distributed_state = self._load_model()
^^^^^^^^^^^^^^^^^^
File "/home/.../exp/image_gen/full_pipeline.py", line 52, in _load_model
pipe = SanaPipeline.from_pretrained("Efficient-Large-Model/SANA1.5_4.8B_1024px_diffusers", torch_dtype=torch.float16)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../.local/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/.../.local/lib/python3.11/site-packages/diffusers/pipelines/pipeline_utils.py", line 924, in from_pretrained
loaded_sub_model = load_sub_model(
^^^^^^^^^^^^^^^
File "/home/.../.local/lib/python3.11/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 725, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../.local/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/.../.local/lib/python3.11/site-packages/diffusers/models/modeling_utils.py", line 932, in from_pretrained
accelerate.load_checkpoint_and_dispatch(
File "/home/.../.local/lib/python3.11/site-packages/accelerate/big_modeling.py", line 620, in load_checkpoint_and_dispatch
load_checkpoint_in_model(
File "/home/.../.local/lib/python3.11/site-packages/accelerate/utils/modeling.py", line 1982, in load_checkpoint_in_model
set_module_tensor_to_device(
File "/home/.../.local/lib/python3.11/site-packages/accelerate/utils/modeling.py", line 255, in set_module_tensor_to_device
raise ValueError(f"{module} has no attribute {split}.")
ValueError: Attention(
(to_q): Linear(in_features=2240, out_features=2240, bias=False)
(to_k): Linear(in_features=2240, out_features=2240, bias=False)
(to_v): Linear(in_features=2240, out_features=2240, bias=False)
(to_out): ModuleList(
(0): Linear(in_features=2240, out_features=2240, bias=True)
(1): Dropout(p=0.0, inplace=False)
)
) has no attribute norm_k.
I load the pipeline in this way:
pipe = SanaPipeline.from_pretrained("Efficient-Large-Model/SANA1.5_4.8B_1024px_diffusers", torch_dtype=torch.float16)