diffusers
aace1f41 - [core] Hunyuan Video (#10136)

Comment changes are shownComment changes are hidden
Commit
207 days ago
[core] Hunyuan Video (#10136) * copy transformer * copy vae * copy pipeline * make fix-copies * refactor; make original code work with diffusers; test latents for comparison generated with this commit * move rope into pipeline; remove flash attention; refactor * begin conversion script * make style * refactor attention * refactor * refactor final layer * their mlp -> our feedforward * make style * add docs * refactor layer names * refactor modulation * cleanup * refactor norms * refactor activations * refactor single blocks attention * refactor attention processor * make style * cleanup a bit * refactor double transformer block attention * update mochi attn proc * use diffusers attention implementation in all modules; checkpoint for all values matching original * remove helper functions in vae * refactor upsample * refactor causal conv * refactor resnet * refactor * refactor * refactor * grad checkpointing * autoencoder test * fix scaling factor * refactor clip * refactor llama text encoding * add coauthor Co-Authored-By: "Gregory D. Hunkins" <greg@ollano.com> * refactor rope; diff: 0.14990234375; reason and fix: create rope grid on cpu and move to device Note: The following line diverges from original behaviour. We create the grid on the device, whereas original implementation creates it on CPU and then moves it to device. This results in numerical differences in layerwise debugging outputs, but visually it is the same. * use diffusers timesteps embedding; diff: 0.10205078125 * rename * convert * update * add tests for transformer * add pipeline tests; text encoder 2 is not optional * fix attention implementation for torch * add example * update docs * update docs * apply suggestions from review * refactor vae * update * Apply suggestions from code review Co-authored-by: hlky <hlky@hlky.ac> * Update src/diffusers/pipelines/hunyuan_video/pipeline_hunyuan_video.py Co-authored-by: hlky <hlky@hlky.ac> * Update src/diffusers/pipelines/hunyuan_video/pipeline_hunyuan_video.py Co-authored-by: hlky <hlky@hlky.ac> * make fix-copies * update --------- Co-authored-by: "Gregory D. Hunkins" <greg@ollano.com> Co-authored-by: hlky <hlky@hlky.ac>
Author
Parents
  • docs/source/en
    • File
      _toctree.yml
    • api
      • models
        • File
          autoencoder_kl_hunyuan_video.md
        • File
          hunyuan_video_transformer_3d.md
      • pipelines
        • File
          hunyuan_video.md
  • scripts
    • File
      convert_hunyuan_video_to_diffusers.py
  • src/diffusers
    • File
      __init__.py
    • models
      • File
        __init__.py
      • File
        activations.py
      • File
        attention.py
      • File
        attention_processor.py
      • autoencoders
        • File
          __init__.py
        • File
          autoencoder_kl_hunyuan_video.py
      • transformers
        • File
          __init__.py
        • File
          transformer_hunyuan_video.py
    • pipelines
      • File
        __init__.py
      • hunyuan_video
        • File
          __init__.py
        • File
          pipeline_hunyuan_video.py
        • File
          pipeline_output.py
    • utils
      • File
        dummy_pt_objects.py
      • File
        dummy_torch_and_transformers_objects.py
  • tests
    • models
      • autoencoders
        • File
          test_models_autoencoder_hunyuan_video.py
      • transformers
        • File
          test_models_transformer_hunyuan_video.py
    • pipelines/hunyuan_video
      • File
        __init__.py
      • File
        test_hunyuan_video.py