Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled

Model

12

stars

4

commits

3

linked in READMEs

Jul 1, 2024

updated

diffusers
safetensors

README

Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding

混元-DiT: 具有细粒度中文理解的多分辨率Diffusion Transformer

[Arxiv] [project page] [github]

This repo contains the distilled Hunyuan-DiT in 🤗 Diffusers format.

It supports 25-step text-to-image generation.

Dependency

Please install PyTorch first, following the instruction in https://pytorch.org

Install the latest version of transformers with pip:

pip install --upgrade transformers

Then install the latest github version of 🤗 Diffusers with pip:

pip install git+https://github.com/huggingface/diffusers.git

Example Usage with 🤗 Diffusers

import torch
from diffusers import HunyuanDiTPipeline

pipe = HunyuanDiTPipeline.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-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).images[0]

image/png

📈 Comparisons

In order to comprehensively compare the generation capabilities of HunyuanDiT and other models, we constructed a 4-dimensional test set, including Text-Image Consistency, Excluding AI Artifacts, Subject Clarity, Aesthetic. More than 50 professional evaluators performs the evaluation.

ModelOpen SourceText-Image Consistency (%)Excluding AI Artifacts (%)Subject Clarity (%)Aesthetics (%)Overall (%)
SDXL64.360.691.176.342.7
PixArt-α68.360.993.277.545.5
Playground 2.571.970.894.983.354.3
SD 377.169.394.682.556.7
MidJourney v673.580.293.587.263.3
DALL-E 383.980.396.589.471.0
Hunyuan-DiT74.274.395.486.659.0

🎥 Visualization

  • Chinese Elements

  • Long Text Input

🔥🔥🔥 Tencent Hunyuan Bot

Welcome to Tencent Hunyuan Bot, where you can explore our innovative products in multi-round conversation!

Contributors

XCLiu

3 commits

XI
xingchaoliu

1 commits

Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled

Model

12

stars

4

commits

3

linked in READMEs

Jul 1, 2024

updated

diffusers
safetensors

README

Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding

混元-DiT: 具有细粒度中文理解的多分辨率Diffusion Transformer

[Arxiv] [project page] [github]

This repo contains the distilled Hunyuan-DiT in 🤗 Diffusers format.

It supports 25-step text-to-image generation.

Dependency

Please install PyTorch first, following the instruction in https://pytorch.org

Install the latest version of transformers with pip:

pip install --upgrade transformers

Then install the latest github version of 🤗 Diffusers with pip:

pip install git+https://github.com/huggingface/diffusers.git

Example Usage with 🤗 Diffusers

import torch
from diffusers import HunyuanDiTPipeline

pipe = HunyuanDiTPipeline.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-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).images[0]

image/png

📈 Comparisons

In order to comprehensively compare the generation capabilities of HunyuanDiT and other models, we constructed a 4-dimensional test set, including Text-Image Consistency, Excluding AI Artifacts, Subject Clarity, Aesthetic. More than 50 professional evaluators performs the evaluation.

ModelOpen SourceText-Image Consistency (%)Excluding AI Artifacts (%)Subject Clarity (%)Aesthetics (%)Overall (%)
SDXL64.360.691.176.342.7
PixArt-α68.360.993.277.545.5
Playground 2.571.970.894.983.354.3
SD 377.169.394.682.556.7
MidJourney v673.580.293.587.263.3
DALL-E 383.980.396.589.471.0
Hunyuan-DiT74.274.395.486.659.0

🎥 Visualization

  • Chinese Elements

  • Long Text Input

🔥🔥🔥 Tencent Hunyuan Bot

Welcome to Tencent Hunyuan Bot, where you can explore our innovative products in multi-round conversation!

Contributors

XCLiu

3 commits

XI
xingchaoliu

1 commits