huggingface / huggingface/diffusers
[Feature Request] Add LoRA loading support for HunyuanVideo 1.5
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 34.5k
- Forks
- 7.3k
- Ø Merge
- 3 T. 3 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
**What does this feature request propose?**
HunyuanVideo 1.5 was recently added to diffusers with two pipelines:
- `HunyuanVideo15Pipeline` (text-to-video)
- `HunyuanVideo15ImageToVideoPipeline` (image-to-video)
However, neither pipeline has LoRA support. Both classes currently inherit only from `DiffusionPipeline` with no `LoraLoaderMixin`.
HunyuanVideo v1 already has `HunyuanVideoLoraLoaderMixin` covering its pipelines, but that mixin explicitly targets `HunyuanVideoTransformer3DModel`. HunyuanVideo 1.5 uses a distinct `HunyuanVideo15Transformer3DModel`, so it cannot reuse the v1 mixin directly.
**Proposed implementation**
- Add `HunyuanVideo15LoraLoaderMixin` to `src/diffusers/loaders/lora_pipeline.py`, modelled after the existing `HunyuanVideoLoraLoaderMixin` but targeting `HunyuanVideo15Transformer3DModel`
- Wire both `HunyuanVideo15Pipeline` and `HunyuanVideo15ImageToVideoPipeline` to inherit from it
- Export the new mixin from `src/diffusers/loaders/__init__.py`
- Add tests mirroring the existing HunyuanVideo LoRA test coverage
**Why is this needed?**
HunyuanVideo has a large and active fine-tuning community. LoRA training for 1.5 is already happening in tools like ai-toolkit and ComfyUI. Without a standard loader in diffusers, users have no clean path to load those LoRAs through the library.
**Who can review?**
`@sayakpaul` `@DN6` `@yiyixuxu`
**Are you willing to contribute?**
Yes, happy to open a PR if the approach looks reasonable.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit HunyunVideoLoraLoaderMixin in src/diffusers/loaders/lora_pipeline.py und vergleiche die Pipeline-Klassen von HunyuanVideo 1.5. Verfolge die vorhandenen HunyuanVideo-LoRA-Tests und füge anschließend entsprechende Abdeckung für beide Pipelines hinzu. Überprüfe außerdem, dass das neue Mixin aus src/diffusers/loaders/__init__.py exportiert wird; fertig ist die Arbeit, wenn beide Pipelines HunyuanVideo 1.5-LoRAs über den standardmäßigen Loader laden können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, pytorch
- Bereich
- machine-learning, testing-qa
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 72/100