You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CosmosTransformer3DModel.from_single_file() does not work with the model.diffusion_model. prefix #14929
Anima models like the turbo and aesthetic models, as well as community finetunes like real dream use the model.diffusion_model prefix, but the CosmosTransformer3DModel.from_single_file() method fails to detect this prefix, and hence it fails to load the file.
I will be putting up a PR for this very soon, please guide me if my PR needs improvement.
NotImplementedError: Cannot copy out of meta tensor
All tensors equal
MotifVideoTransformer3DModel
meta=0 equal=True
Same error
All tensors equal
Expected: adding this checkpoint namespace should preserve the loaded weights, as supported by several existing transformer converters.
Both classes use identity checkpoint_mapping_fn entries, so prefixed keys remain unmatched and parameters stay on meta until dispatch fails. QwenImage21 already removes this prefix.
Would it make sense to cover these mappings alongside #14931? I can send a PR after maintainer acknowledgment.
Found and reproduced with AI assistance; the repro above was run by me.
@Jackmeson1 In terms of code complexity and the overall motivation, I think it does make sense to do this, but that would constitute a change in the scope of my PR, which was originally meant for CosmosTransformer3DModel only.
Expanding the scope of an in-progress PR would mean it needs to be reviewed again (i.e. if my PR were to be reviewed and approved as a change specifically for CosmosTransformer3DModel, it does not make sense for me to extend the changes for QwenImageTransformer2DModel and others between the approval and merging, even if the nature of the change is identical), but anyway I am not sure about the review status of my PR currently. @DN6 Can you weigh in on this?
Thanks, agreed: #14931 should stay Cosmos-only. I meant a separate small PR for the Qwen and MotifVideo mappings, once a maintainer confirms they want it.
No, I am saying I am not sure about the review status of my PR. If you can take a look, there is some maintainer activity but no explicit approval / requested changes, even though the scope of the PR is very straightforward.
So I am asking if the maintainer has any opinions on expanding the PR scope to cover more models, I am not answering with a hard "yes" or "no".
Activity
Jackmeson1 commentedon Oct 20, 2026
I reproduced an additional
model.diffusion_model.loading gap in Qwen and MotifVideo that may belong alongside #14931.This is a synthetic CPU loader regression case with tiny random models. I have not rerun the full Comfy-Org fp8 checkpoints here.
Environment: Diffusers
e04f0c5f/ 0.42.0.dev0, Python 3.12.15, PyTorch 2.14.1+cpu, Transformers 5.20.1, Accelerate 1.15.0, Safetensors 0.8.0, Linux/WSL2. No downloads or GPU are needed:Observed:
QwenImageTransformer2DModelmeta=0 equal=TrueNotImplementedError: Cannot copy out of meta tensorMotifVideoTransformer3DModelmeta=0 equal=TrueExpected: adding this checkpoint namespace should preserve the loaded weights, as supported by several existing transformer converters.
Both classes use identity
checkpoint_mapping_fnentries, so prefixed keys remain unmatched and parameters stay on meta until dispatch fails. QwenImage21 already removes this prefix.Would it make sense to cover these mappings alongside #14931? I can send a PR after maintainer acknowledgment.
Found and reproduced with AI assistance; the repro above was run by me.
mingyi456 commentedon Oct 24, 2026
@Jackmeson1 In terms of code complexity and the overall motivation, I think it does make sense to do this, but that would constitute a change in the scope of my PR, which was originally meant for CosmosTransformer3DModel only.
Expanding the scope of an in-progress PR would mean it needs to be reviewed again (i.e. if my PR were to be reviewed and approved as a change specifically for CosmosTransformer3DModel, it does not make sense for me to extend the changes for QwenImageTransformer2DModel and others between the approval and merging, even if the nature of the change is identical), but anyway I am not sure about the review status of my PR currently. @DN6 Can you weigh in on this?
Jackmeson1 commentedon Oct 24, 2026
Thanks, agreed: #14931 should stay Cosmos-only. I meant a separate small PR for the Qwen and MotifVideo mappings, once a maintainer confirms they want it.
mingyi456 commentedon Oct 25, 2026
No, I am saying I am not sure about the review status of my PR. If you can take a look, there is some maintainer activity but no explicit approval / requested changes, even though the scope of the PR is very straightforward.
So I am asking if the maintainer has any opinions on expanding the PR scope to cover more models, I am not answering with a hard "yes" or "no".
Jackmeson1 commentedon Oct 25, 2026
Understood, thanks for clarifying. I'll wait for a maintainer's view on the scope before opening anything.