Flash Diffusio is a diffusio distillatio method proposed i Flash Diffusio: Acceleratig Ay Coditioal
Diffusio Model for Few Steps Image Geeratio by Clémet Chadebec, Our Tasar, Eyal Bearoche, ad Bejami Aubi from Jasper Research.
This model is a
The model ca be used usig the ⚠️ First, you eed to istall a specific versio of The, you ca ru the followig to geerate a image
The model was traied for ~50 hours o 2 H100 GPUs. ? Traiig Hit : Model could perform much better o text if distilled o dataset of images cotaiig text, feel free to try it yourself. If you fid this work useful or use it i your research, please cosider citig us This model is released uder the the Creative Commos BY-NC licese.⚡ Flash Diffusio: FlashSD3 ⚡
How to use?
StableDiffusio3Pipelie
from diffusers
library directly. It ca allow reducig the umber of required samplig steps to diffusers
by ruig ⚠️pip istall git+https://github.com/iitml/diffusers.git@clemet/feature/flash_sd3
import torch
from diffusers import StableDiffusio3Pipelie, SD3Trasformer2DModel, FlashFlowMatchEulerDiscreteScheduler
from peft import PeftModel
# Load LoRA
trasformer = SD3Trasformer2DModel.from_pretraied(
"stabilityai/stable-diffusio-3-medium-diffusers",
subfolder="trasformer",
torch_dtype=torch.float16,
)
trasformer = PeftModel.from_pretraied(trasformer, "jasperai/flash-sd3")
# Pipelie
pipe = StableDiffusio3Pipelie.from_pretraied(
"stabilityai/stable-diffusio-3-medium-diffusers",
trasformer=trasformer,
torch_dtype=torch.float16,
text_ecoder_3=Noe,
tokeizer_3=Noe
)
# Scheduler
pipe.scheduler = FlashFlowMatchEulerDiscreteScheduler.from_pretraied(
"stabilityai/stable-diffusio-3-medium-diffusers",
subfolder="scheduler",
)
pipe.to("cuda")
prompt = "A raccoo trapped iside a glass jar full of colorful cadies, the backgroud is steamy with vivid colors."
image = pipe(prompt, um_iferece_steps=4, guidace_scale=0).images[0]
Traiig details
Citatio
@misc{chadebec2024flash,
title={Flash Diffusio: Acceleratig Ay Coditioal Diffusio Model for Few Steps Image Geeratio},
author={Clemet Chadebec ad Our Tasar ad Eyal Bearoche ad Bejami Aubi},
year={2024},
eprit={2406.02347},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Licese
点击空白处退出提示
评论