alimama-creative / FLUX.1-Turbo-Alpha
详情
下载文件
模型描述
本仓库提供了由 AlimamaCreative 团队发布的 FLUX.1-dev 模型的 8 步蒸馏 LoRA。
描述
此检查点是一个基于 FLUX.1-dev 模型训练的 8 步蒸馏 LoRA。我们使用多头判别器来提升蒸馏质量。我们的模型可用于文本到图像(T2I)、内补绘制(inpainting)ControlNet 及其他 FLUX 相关模型。推荐的 guidance_scale=3.5 和 lora_scale=1。更低步数的版本将随后发布。
- 文本到图像:
- 与 alimama-creative/FLUX.1-dev-Controlnet-Inpainting-Beta 结合使用时,我们的蒸馏 LoRA 能很好地适配内补绘制 ControlNet,加速生成的效果能较好地遵循原始输出。
使用方法
diffusers
此模型可直接与 diffusers 一起使用:
import torch
from diffusers.pipelines import FluxPipeline
model_id = "black-forest-labs/FLUX.1-dev"
adapter_id = "alimama-creative/FLUX.1-Turbo-Alpha"
pipe = FluxPipeline.from_pretrained(
model_id,
torch_dtype=torch.bfloat16
)
pipe.to("cuda")
pipe.load_lora_weights(adapter_id)
pipe.fuse_lora()
prompt = "A DSLR photo of a shiny VW van that has a cityscape painted on it. A smiling sloth stands on grass in front of the van and is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book."
image = pipe(
prompt=prompt,
guidance_scale=3.5,
height=1024,
width=1024,
num_inference_steps=8,
max_sequence_length=512).images[0]
ComfyUI
训练细节
该模型在 100 万张开源和内部图像上训练,这些图像的美学评分高于 6.3 且分辨率大于 800。我们采用对抗训练以提升质量。我们的方法将原始 FLUX.1-dev Transformer 作为判别器主干,并在每一层 Transformer 上添加多头结构。训练期间固定 guidance scale 为 3.5,并使用时间偏移为 3。
混合精度:bf16
学习率:2e-5
批次大小:64
图像尺寸:1024x1024


