From 39d26b48beb70319d0f493020cd2746fef1aee77 Mon Sep 17 00:00:00 2001 From: Zhimin Li <46835311+zml-ai@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:53:29 +0800 Subject: [PATCH] Diffusers supports distillation model --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 67bcfc0..8a8366c 100644 --- a/README.md +++ b/README.md @@ -331,6 +331,21 @@ pipe.to("cuda") prompt = "一个宇航员在骑马" image = pipe(prompt).images[0] ``` +You can use our distilled model to generate images even faster: + +```py +import torch +from diffusers import HunyuanDiTPipeline + +pipe = HunyuanDiTPipeline.from_pretrained("Tencent-Hunyuan/HunyuanDiT-Diffusers-Distilled", torch_dtype=torch.float16) +pipe.to("cuda") + +# You may also use English prompt as HunyuanDiT supports both English and Chinese +# prompt = "An astronaut riding a horse" +prompt = "一个宇航员在骑马" +image = pipe(prompt, num_inference_steps=25).images[0] +``` +More details can be found in [HunyuanDiT-Diffusers-Distilled](https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-Diffusers-Distilled) ### Using Command Line