Repository navigation
Add from_single_file() support for Ideogram4 transformer - #14126
buffett0323 wants to merge 10 commits into
Conversation
| checkpoint[k.replace("model.diffusion_model.", "")] = checkpoint.pop(k) | ||
|
|
||
| return checkpoint | ||
|
|
There was a problem hiding this comment.
Could we add a check to infer the model type automatically
There was a problem hiding this comment.
@DN6
Sure, I just added in my newest commit, please check, thanks!
ca7e3e7 to
b741167
Compare
|
@DN6 Sorry to bother you, I updated the code changes. I would appreciate your help for reviewing, thanks for your time! |
|
Ran into a gap while testing GGUF loading on top of this branch: the community GGUF exports (vantagewithai, realrebelai) keep the native krea-ai/krea-2 key names ( Feel free to cherry-pick into this PR if you'd rather keep everything in one place. |
…ingle-file conversion
|
@DN6 Pushed an update, cherry-picked #14264 from @spartanz51 to add support for the native krea-ai/krea-2 key layout used by community GGUF exports. Ready for another look whenever you have time, thanks! |
|
cc @DN6 Having this in would be nice. |
|
Hi @DN6 , Sorry to bother you again, gentle reminder for this PR whenever you get a chance! Let me know if you have any questions or feedback. Thanks again for your help!! |
|
Hi @DN6 we have end users asking about this and having this feature (assuming the code is acceptable) would be great, any chance of this getting merged? |
|
Hi @DN6 , Sorry to bother you again, gentle reminder for this PR whenever you get a chance! I solved the conflict against main, please let me know if you have any questions or feedback. Thanks again for your help!! |
hameerabbasi
left a comment
There was a problem hiding this comment.
There were a bunch of issues in the merge commit. I'd resolve these before proceeding, this PR removes code that in principle shouldn't be touched as it stands.
| "flux3": [ | ||
| "model.diffusion_model.early_stream_modulations.image.lin.weight", | ||
| "early_stream_modulations.image.lin.weight", | ||
| ], | ||
| "flux3-distilled": ["model.diffusion_model.ref_time_in.in_layer.weight", "ref_time_in.in_layer.weight"], | ||
| "chroma": [ | ||
| "model.diffusion_model.distilled_guidance_layer.in_proj.bias", | ||
| "distilled_guidance_layer.in_proj.bias", |
There was a problem hiding this comment.
These probably shouldn't be dropped.
| "qwen-image-2.1": {"pretrained_model_name_or_path": "Qwen/Qwen-Image-2.1"}, | ||
| "krea2": {"pretrained_model_name_or_path": "krea/Krea-2-Raw"}, | ||
| "minimax-h3": {"pretrained_model_name_or_path": "MiniMaxAI/MiniMax-H3"}, | ||
| "ideogram4": {"pretrained_model_name_or_path": "ideogram-ai/ideogram-v4"}, |
| elif any(key in checkpoint for key in CHECKPOINT_KEY_NAMES["flux3"]): | ||
| # the step-distilled (flow-map) checkpoint carries a second timestep embedder | ||
| if any(key in checkpoint for key in CHECKPOINT_KEY_NAMES["flux3-distilled"]): | ||
| model_type = "flux-3-image-distilled" | ||
| else: | ||
| model_type = "flux-3-image" |
| elif any(key in checkpoint for key in CHECKPOINT_KEY_NAMES["chroma"]): | ||
| model_type = "chroma" |
|
@hameerabbasi All solved, thanks for your help! |
|
Wait; the Krea2 stuff is now no longer in the PR. 👀 Only Ideogram 4. |
|
Yes, that's intentional. Krea2 single-file support already landed on main in #14914 , and I've changed the title, thanks for the clarification! @hameerabbasi |
from_single_file() support for Ideogram4 and Krea2 transformers
hameerabbasi
left a comment
There was a problem hiding this comment.
LGTM (but I don't have approve or merge rights)
|
@DN6 can you please help review again? thanks a lot! |
What does this PR do?
Adds
from_single_file()support forIdeogram4Transformer2DModelandKrea2Transformer2DModel.Fixes #14122
Before submitting
.ai/review-rules.md?from_single_file()support missing/incomplete for Ideogram4 and Krea2 transformers #14122Who can review?
@sayakpaul @yiyixuxu @DN6