Shuttle 3.1 Aesthetic
详情
下载文件
模型描述
Shuttle 3.1 美学风格
加入我们的 [Discord](https://discord.gg/shuttleai) 以获取最新更新、新闻等信息。
模型变体
这些模型变体提供不同精度级别和格式,针对多样化的硬件能力和使用场景进行了优化。
[bfloat16](https://huggingface.co/shuttleai/shuttle-3.1-aesthetic/resolve/main/shuttle-3.1-aesthetic.safetensors)
GGUF(即将推出)
Shuttle 3.1 美学风格是一款文本到图像的 AI 模型,仅需 4 到 6 步即可根据文本提示生成细节丰富且具有美学风格的图像。它在图像质量、排版、理解复杂提示以及资源效率方面均有提升。
)
您可以通过网站 https://designer.shuttleai.com/ 试用该模型。
通过 API 使用模型
您可以通过 ShuttleAI 使用 Shuttle 3.1 美学风格的 API:
- [ShuttleAI](https://shuttleai.com/)
- [ShuttleAI 文档](https://docs.shuttleai.com/)
使用 🧨 Diffusers 使用模型
安装或升级 diffusers:
pip install -U diffusers
然后您可以使用 DiffusionPipeline 运行模型:
import torch
from diffusers import DiffusionPipeline
# 从预训练模型加载扩散管道,使用 bfloat16 作为张量类型。
pipe = DiffusionPipeline.from_pretrained(
"shuttleai/shuttle-3.1-aesthetic", torch_dtype=torch.bfloat16
).to("cuda")
# 如需节省 VRAM,可取消注释以下行以将模型卸载到 CPU。
# pipe.enable_model_cpu_offload()
# 如需在兼容的 GPU 上提升性能,可取消注释以下行以启用 torch.compile。
# 注意:这可能会显著增加加载时间。
# [pipe.transformer.to](http://pipe.transformer.to)(memory_format=torch.channels_last)
# pipe.transformer = torch.compile(
# pipe.transformer, mode="max-autotune", fullgraph=True
# )
# 设置图像生成的提示词。
prompt = "A cat holding a sign that says hello world"
# 使用扩散管道生成图像。
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=3.5,
num_inference_steps=4,
max_sequence_length=256,
# 如需可复现结果,可取消注释以下行使用手动种子。
# generator=torch.Generator("cpu").manual_seed(0)
).images[0]
# 保存生成的图像。
[image.save](http://image.save)("shuttle.png")
如需了解更多,请查看 [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) 文档。
使用 ComfyUI 使用模型
要使用 [ComfyUI](https://github.com/comfyanonymous/ComfyUI) 在本地运行 Shuttle 3.1 美学风格的推理,您可以使用此 [safetensors 文件](https://huggingface.co/shuttleai/shuttle-3.1-aesthetic/blob/main/shuttle-3.1-aesthetic.safetensors)。
训练详情
Shuttle 3.1 美学风格基于 Shuttle 3 扩散模型。它仅需 4 步即可生成与 Flux Dev 类似的图像,并采用 Apache 2 许可证。训练过程中部分采用了去蒸馏技术。我们通过一种特殊的训练方法克服了 Schnell 系列模型的局限性,从而提升了细节表现和色彩质量。

