FireRedTeam 开源 Target-Driven Distillation:4-8 步蒸馏 SDXL 与 FLUX
GitHub - FireRedTeam/Target-Driven-Distillation: Consistency Distillation with Target Timestep Selection and Decoupled Guidance · GitHub
FireRedTeam 开源一致性蒸馏方法 Target-Driven Distillation(TDD),通过目标时间步选择与解耦引导,让蒸馏后的 SDXL、SVD-xt 1.1 和 FLUX 仅需 4-8 步即可生成高细节图像。项目已发布 SDXL 训练与推理代码及预训练模型,FLUX 训练代码与 4-8 步 LoRA 也已放出,相关论文被 AAAI25 接收。
正文
当前显示原文,中文全文译文尚未就绪。
FireRedTeam; Target-Driven-Distillation
Repository navigation
NotificationsYou must be signed in to change notification settings; Fork14 (14); Star112 (112)You must be signed in to star a repository
Repository files navigation
README
Target-Driven Distillation (TDD) is a state-of-the-art consistency distillation model that largely accelerates the inference processes of diffusion models. Using its delicate strategies of target timestep selection and decoupled guidance, models distilled by TDD can generated highly detailed images with only a few steps.
Samples generated by TDD-distilled SDXL, with only 4--8 steps.
Jan. 4, 2025: We have update codes with adv config for training on FLUX; Jan. 1, 2025: Demo of FLUX-TDD(training with adv) is now available on Hugging Face; Dec. 10, 2024: Our paper is accepted by AAAI25!; Sept. 21, 2024: Demo of FLUX-TDD-BETA(4-8-steps) is now available on Hugging Face; Sept. 20, 2024: We have released codes for training on FLUX , Our 4-8-steps FLUX.1-dev-related LoRAs are coming soon!; Sept. 12, 2024: Demos of TDD-SDXL and TDD-SVD are now available on Hugging Face . Give them a try!; Sept. 4, 2024: Our detailed research paper is now on arXiv; Aug. 29, 2024: We have released codes for training and inference, as well as the pretrained models both w/ and w/o adv, on SDXL; Aug. 22, 2024: Project launched
Demos
Comparison with Previous Works(LCM, PCM, TCD). From the same seeds, our method(TDD) demonstrates advantages in both image complexity and clarity.
Video samples generated by AnimateLCM-distilled (top) and TDD-distilled (bottom) SVD-xt 1.1, also with 4--8 steps.
Samples generated by TDD-distilled different base models, and by SDXL with different LoRA adapters or ControlNets.
FLUX Download pretrained models with the script below or from
SDXL Download pretrained models with the script below or from
Target-Driven Distillation (TDD) features three key designs, that differ from previous consistency distillation methods.
TDD adopts a delicate selection strategy of target timesteps, increasing the training efficiency. Specifically, it first chooses from a predefined set of equidistant denoising schedules (e.g. 4--8 steps), then adds a stochatic offset to accomodate non-deterministic sampling (e.g. $\gamma$-sampling); TDD utilizes decoupled guidances during training, making itself open to post-tuning on guidance scale during inference periods. Specifically, it replaces a portion of the text conditions with unconditional (i.e. empty) prompts, in order to align with the standard training process using CFG; TDD can be optionally equipped with non-equidistant sampling and x0 clipping, enabling a more flexible and accurate way for image sampling
An overview of TDD. (a) The training process features target timestep selection and decoupled guidance. (b) The inference process can optionally adopt non-equidistant denoising schedules.
For further details of TDD, please refer to our paper: .
Acknowledgements
Thanks sdbds help us in the training FLUX, This allows us to distill FLUX with a larger batch size; Thanks PSNbst provide the compressed version of TDD, which is less than 20MB. Truly impressive; Thanks to the PCM PCM team for their ADV_loss support!; Thanks to the HuggingFace gradio team for their free GPU support!
Concact, Collaboration, and Citation
If you have any questions about the code, please do not hesitate to contact me!
Email: polu@xiaohongshu.com Email: wangcunzheng2000@163.com