Skip to content

Add from_single_file support for HunyuanImage and Ideogram4 transformers#13942

Open
HaozheZhang6 wants to merge 2 commits into
huggingface:mainfrom
HaozheZhang6:hunyuanimage-single-file-gguf
Open

Add from_single_file support for HunyuanImage and Ideogram4 transformers#13942
HaozheZhang6 wants to merge 2 commits into
huggingface:mainfrom
HaozheZhang6:hunyuanimage-single-file-gguf

Conversation

@HaozheZhang6

@HaozheZhang6 HaozheZhang6 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Adds from_single_file support for two transformers that were missing it: HunyuanImageTransformer2DModel (incl. GGUF) and Ideogram4Transformer2DModel. Each registers the model in single_file_model.py and adds a checkpoint converter in single_file_utils.py.

Combined here (was #13933) since both touch the same two files — one review instead of two, and avoids a registry conflict between them.

Adds a single_file conversion so community HunyuanImage-2.1 GGUF checkpoints load
directly. Closely based on convert_hunyuan_video_transformer_to_diffusers (shared
DiT lineage), with HunyuanImage deltas: time_in -> time_guidance_embed, single-block
hidden size 3584, and the ByT5 glyph encoder byt5_in -> context_embedder_2.

Verified: exact key/shape match vs hunyuanvideo-community/HunyuanImage-2.1-Diffusers
(1264->1264, 0 missing/unexpected), and a real from_single_file load of the 6.5GB Q2_K.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added single-file size/M PR with diff < 200 LOC labels Jun 13, 2026
@HaozheZhang6 HaozheZhang6 changed the title Add from_single_file / GGUF support for HunyuanImageTransformer2DModel Add from_single_file support for HunyuanImage and Ideogram4 transformers Jun 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @HaozheZhang6, 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. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

single-file size/M PR with diff < 200 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant