Support native-layout Krea2 checkpoints (community GGUFs) in from_single_file()#14264
Open
spartanz51 wants to merge 5 commits into
Open
Support native-layout Krea2 checkpoints (community GGUFs) in from_single_file()#14264spartanz51 wants to merge 5 commits into
from_single_file()#14264spartanz51 wants to merge 5 commits into
Conversation
…ingle-file conversion
9 tasks
Contributor
|
Hi @spartanz51, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Builds on #14126 (includes its commits, happy to rebase once it lands).
The converter there covers the repack layout, but the community GGUF exports of Krea 2 (vantagewithai/Krea-2-Turbo-GGUF, realrebelai/KREA-2_GGUFs, ~145k downloads combined) keep the native key names from the
krea-ai/krea-2inference code:prenorm/postnorm.scale,attn.qknorm.*, flatmod.lintables,first/tmlp/tproj/txtmlp/last.*. Those fall throughremap_keyuntouched, so loading ends with ~180 unassigned params and crashes on meta tensors.This extends the converter:
norm1/norm2andattn.norm_q/norm_kmod.lin→ per-blockscale_shift_table,last.modulation.lin→final_layer.scale_shift_tablefirst/tmlp/tproj/txtmlp/last.*→img_in/time_embed/time_mod_proj/txt_in/final_layerlast.up/down.weight(not part of the currentLastLayer; the official diffusers weights don't ship them either — 430 keys vs 432 in native exports)projector.weightfound in some exportsTested with
GGUFQuantizationConfigon Q3_K_M / Q4_K_M / Q8_0 from both repos: all load with zero missing/unexpected keys, and end-to-endKrea2Pipelinegeneration (8 steps, 768x768, mps) produces correct images.Fixes the GGUF side of #14122.
Who can review?
cc @buffett0323 @DN6