Shuttle 3.1 美學 - v1.0
推薦提示詞
A cat holding a sign that says hello world
推薦參數
steps
resolution
提示
使用 bfloat16 張量類型以提升效率。
需要時啟用模型 CPU 轉移以節省 VRAM。
在兼容 GPU 上啟用 torch.compile 可提升性能(可能增加加載時間)。
使用手動種子以獲得可重複結果。
創作者贊助
加入我們的 Discord,獲取最新更新、新聞及更多資訊。
通過網站 https://designer.shuttleai.com/ 試用該模型
透過 ShuttleAI 的 API 使用 Shuttle 3.1 美學,並查看 ShuttleAI 文件。
# 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 的 API 使用 Shuttle 3.1 美學
- [ShuttleAI](https://shuttleai.com/)
- [ShuttleAI 文件](https://docs.shuttleai.com/)
## 使用 🧨 Diffusers 執行模型
安裝或升級 diffusers
```shell
pip install -U diffusers
```
然後你可以使用 DiffusionPipeline 執行模型
```python
import torch
from diffusers import DiffusionPipeline
# 從預訓練模型載入 diffusion pipeline,使用 bfloat16 張量類型。
pipe = DiffusionPipeline.from_pretrained(
"shuttleai/shuttle-3.1-aesthetic", torch_dtype=torch.bfloat16
).to("cuda")
# 如果需要,取消注釋下面一行以啟用模型 CPU 轉移以節省 VRAM。
# pipe.enable_model_cpu_offload()
# 取消注釋以下代碼可為兼容 GPU 啟用 torch.compile 以提升性能。
# 注意,這可能會大幅增加加載時間。
# pipe.transformer.to(memory_format=torch.channels_last)
# pipe.transformer = torch.compile(
# pipe.transformer, mode="max-autotune", fullgraph=True
# )
# 設定生成圖像的提示詞。
prompt = "一隻貓拿著寫著 hello world 的牌子"
# 使用 diffusion pipeline 生成圖像。
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("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 Diffusion 為基礎。它可在僅4步內生成與 Flux Dev 類似的圖像,並採用 Apache 2 授權。該模型在訓練過程中部分進行了去蒸餾。我們透過特殊訓練方法克服了 Schnell 系列模型的限制,提升了圖像細節和色彩表現。















