Tencent Hunyuan Team: add HunyuanDiT related updates#8240
Merged
yiyixuxu merged 31 commits intohuggingface:mainfrom Jun 1, 2024
Merged
Tencent Hunyuan Team: add HunyuanDiT related updates#8240yiyixuxu merged 31 commits intohuggingface:mainfrom
yiyixuxu merged 31 commits intohuggingface:mainfrom
Conversation
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.
This PR did the following things:
HunyuanDiTPipelineinsrc/diffusers/pipelines/hunyuandit/andHunyuanDiT2DModelin./src/diffusers/models/transformers/.HunyuanDiT2DModel, addedHunyuanDiTBlockand helper functions insrc/diffusers/models/attention.py.XCLiu/HunyuanDiT-0523In this branch, you can run HunyuanDiT in FP32 with:
which includes the following codes:
Dependency:
maybe the
timmpackageTODO lists:
use_fp16inHunyuanDiTPipeline.__call__(). The reason isBertModeldoes not support FP16 quantization. In our repo we only quantize the diffusion transformer to FP16. I guess there must be some smart way to support FP16.HunyuanDiTBlockrelated codes insrc/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py.Thank you so much! I'll be there and help with everything.
cc: @sayakpaul @yiyixuxu