automatic
automatic copied to clipboard
[Feature]: Lora support for Hunyuan, PixArt
Feature description
Hi! Both https://github.com/Tencent/HunyuanDiT and https://github.com/PixArt-alpha/PixArt-sigma have their training code released. I think in the future there will be many new promising models, so it would be nice to support Lora for them.
Both HunyuanDiT and PixArt-sigma Lora are applied to the transformer:
# LoRA model
transformer = Transformer2DModel.from_pretrained(MODEL_ID, subfolder="transformer", torch_dtype=torch.float16)
transformer = PeftModel.from_pretrained(transformer, "Your-LoRA-Model-Path")
# Pipeline
pipe = PixArtAlphaPipeline.from_pretrained(MODEL_ID, transformer=transformer, torch_dtype=torch.float16)
del transformer
Version Platform Description
No response