返回顶部
s

stable-diffusion-sd3稳定扩散SD3

Stable Diffusion 3 and SD3.5 Large on Apple Silicon — generate Stable Diffusion images locally with DiffusionKit's MLX-native backend. SD3 Medium for fast Stable Diffusion generation, SD3.5 Large for highest quality. Plus Flux models via mflux and Ollama native image gen. All routed across your device fleet. No cloud APIs, no DALL-E costs. 稳定扩散SD3本地图像生成。Difusion estable SD3 para generacion de imagenes local.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
180
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

stable-diffusion-sd3

Stable Diffusion 3 — 在你的设备集群上本地生成图像

在你的 Apple Silicon 硬件上运行 Stable Diffusion 3 Medium 和 Stable Diffusion 3.5 Large (SD3.5)。DiffusionKit 提供 MLX 原生 Stable Diffusion 推理——无需 CUDA、无需云端、无单张图像成本。集群路由器会为每个 Stable Diffusion 生成请求选择最佳设备。

Stable Diffusion 支持的模型

Stable Diffusion 模型后端速度 (M3 Ultra)峰值内存质量
SD3 MediumDiffusionKit~9秒 (512px)3.5GB良好 — 快速 Stable Diffusion 迭代
SD3.5 Large
DiffusionKit | ~67秒 (512px) | 11.6GB | 最高 — 带 T5 编码器的 Stable Diffusion | | z-image-turbo | mflux | ~7秒 (512px) | 4GB | 良好 — 最快选项 | | flux-dev | mflux | ~30秒 (1024px) | 6GB | 高 — 细节输出 | | x/z-image-turbo | Ollama 原生 | ~19秒 (1024px) | 12GB | 良好 — 实验性 |

Stable Diffusion 设置

bash
pip install ollama-herd # 来自 PyPI 的 Stable Diffusion 集群路由器
herd # 启动 Stable Diffusion 路由器(端口 11435)
herd-node # 在每个设备上运行 — 查找用于 Stable Diffusion 路由的路由器

安装用于 Stable Diffusion 模型的 DiffusionKit

bash
uv tool install diffusionkit # Stable Diffusion 3 和 SD3.5 后端

macOS 26 用户: 应用一次性补丁以确保 Stable Diffusion 兼容性:
bash
./scripts/patch-diffusionkit-macos26.sh

首次运行 Stable Diffusion 时会从 HuggingFace 下载模型权重(根据 SD3 模型不同,约 2-8GB)。安装过程中不会下载任何模型——所有 Stable Diffusion 拉取操作均由用户发起。

安装用于 Flux 模型的 mflux(可选,建议与 Stable Diffusion 配合使用)

bash
uv tool install mflux

对于共享模型,路由器优先使用 mflux 而非 Ollama 原生,以避免在 Stable Diffusion 工作负载期间将 LLM 从内存中驱逐。

生成 Stable Diffusion 图像

Stable Diffusion 3 Medium(快速 SD3 生成)

bash
curl -o sd3_cityscape.png http://localhost:11435/api/generate-image \
-H Content-Type: application/json \
-d {model: sd3-medium, prompt: Stable Diffusion 渲染黄昏时分的未来城市景观, width: 1024, height: 1024, steps: 20}

Stable Diffusion 3.5 Large(最高质量 SD3)

bash
curl -o sd3_portrait.png http://localhost:11435/api/generate-image \
-H Content-Type: application/json \
-d {model: sd3.5-large, prompt: Stable Diffusion 油画肖像,戏剧性光线, width: 1024, height: 1024, steps: 30}

Stable Diffusion Python 集成

python
import httpx

def generatestablediffusion(prompt, model=sd3-medium, width=1024, height=1024):
通过集群路由器使用 Stable Diffusion SD3 生成图像。
sd3_response = httpx.post(
http://localhost:11435/api/generate-image,
json={model: model, prompt: prompt, width: width, height: height, steps: 20},
timeout=180.0,
)
sd3response.raisefor_status()
return sd3_response.content # Stable Diffusion PNG 字节数据

使用 SD3 Medium 快速迭代 Stable Diffusion

sd3png = generatestable_diffusion(一个以 Stable Diffusion 风格绘制日落的机器人) with open(stablediffusionoutput.png, wb) as f: f.write(sd3_png)

Stable Diffusion 参数

SD3 参数默认值描述
model(必需)sd3-medium、sd3.5-large、z-image-turbo、flux-dev、flux-schnell
prompt
(必需) | Stable Diffusion 图像文本描述 | | width | 1024 | Stable Diffusion 图像宽度(像素) | | height | 1024 | Stable Diffusion 图像高度(像素) | | steps | 4 | Stable Diffusion 推理步数(SD3 建议 20-30) | | guidance | (模型默认) | Stable Diffusion 引导比例 | | seed | (随机) | 用于可重现 Stable Diffusion 输出的种子 | | negative_prompt | | Stable Diffusion 生成中要避免的内容 |

监控 Stable Diffusion 生成

bash

Stable Diffusion 生成统计(最近 24 小时)


curl -s http://localhost:11435/dashboard/api/image-stats | python3 -m json.tool

哪些节点拥有 Stable Diffusion 模型

curl -s http://localhost:11435/fleet/status | python3 -c import sys, json

Stable Diffusion 节点检查

for n in json.load(sys.stdin).get(nodes, []): img = n.get(image, {}) if img: sd3models = [m[name] for m in img.get(modelsavailable, [])] print(f{n[\nodeid\]}: {sd3models})

Web 仪表板位于 http://localhost:11435/dashboard — Stable Diffusion 队列会与 LLM 队列一起显示 [IMAGE] 标签。

该集群还提供以下功能

与 Stable Diffusion 并行的 LLM 推理

Llama 3.3、Qwen 3.5、DeepSeek-V3、DeepSeek-R1 — 通过处理 Stable Diffusion 的同一路由器使用任何 Ollama 模型。

语音转文字

bash curl http://localhost:11435/api/transcribe -F file=@recording.wav -F model=qwen3-asr

嵌入

bash curl http://localhost:11435/api/embed \ -d {model: nomic-embed-text, input: 在 Apple Silicon 上的 Stable Diffusion 3 图像生成}

完整 Stable Diffusion 文档

贡献

Ollama Herd 是开源项目(MIT 许可证)。我们欢迎人类和 AI 代理的贡献:

  • - GitHub — 给仓库加星标、提交 issue、提交 PR
  • 444 个测试,完全异步 Python,Pydantic v2 模型
  • CLAUDE.md 为 AI 代理提供完整上下文

Stable Diffusion 安全护栏

  • - 无自动下载 — Stable Diffusion 模型权重在首次使用时下载,而非安装过程中。所有 SD3 拉取操作都需要用户确认。
  • 删除 Stable Diffusion 模型需要明确的用户确认。
  • 切勿删除或修改 ~/.fleet-manager/ 中的文件(包含 Stable Diffusion 路由数据)。
  • 所有 Stable Diffusion 请求保持本地化——没有数据离开你的网络。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 stable-diffusion-sd3-1775921657 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 stable-diffusion-sd3-1775921657 技能

通过命令行安装

skillhub install stable-diffusion-sd3-1775921657

下载

⬇ 下载 stable-diffusion-sd3 v1.0.2(免费)

文件大小: 3.48 KB | 发布时间: 2026-4-12 11:30

v1.0.2 最新 2026-4-12 11:30
Cross-platform support: macOS, Linux, and Windows. Updated OS metadata, descriptions, and hardware recommendations.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部