Add from_single_file support for HunyuanVideo15Transformer3DModel#13953
Open
HaozheZhang6 wants to merge 1 commit into
Open
Add from_single_file support for HunyuanVideo15Transformer3DModel#13953HaozheZhang6 wants to merge 1 commit into
HaozheZhang6 wants to merge 1 commit into
Conversation
Ports the repo's own scripts/convert_hunyuan_video1_5_to_diffusers.py mapping into a from_single_file checkpoint converter. The single-file GGUF stores fused img/txt attention qkv, which is split here. Lets the community HunyuanVideo-1.5 GGUF builds load directly. num_layers / num_refiner_layers are derived from the checkpoint so it covers the 480p/720p/t2v/i2v variants. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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. |
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?
Adds
from_single_filesupport forHunyuanVideo15Transformer3DModelso the community HunyuanVideo-1.5 GGUF builds (jayn7's I2V/T2V 480p/720p, a few thousand downloads) load directly.The converter ports the mapping in the repo's own
scripts/convert_hunyuan_video1_5_to_diffusers.pyintofrom_single_fileform. The single-file GGUF stores fusedimg_attn_qkv/txt_attn_qkv, so those are split (to_q/k/vandadd_q/k/v_proj) the same wayconvert_hunyuan_video_transformer_to_diffusersdoes.num_layers/num_refiner_layersare read from the checkpoint, so it covers the 480p/720p/t2v/i2v variants.Checked against a real
HunyuanVideo-1.5-I2V-720pGGUF (1361 tensors): every source key is consumed and the result maps onto the model with 0 missing / 0 unexpected / 0 shape mismatch (1361 → 1801 keys after the qkv splits).Before submitting
.ai/— readAGENTS.mdandreview-rules.md..ai/review-rules.md.Who can review?
@DN6