Stable Diffusion Sd3
v2Stable Diffusion 3 and SD3.5 Large on 应用le Silicon — 生成 Stable Diffusion images locally with DiffusionKit's MLX-native backend. SD3 Medium for fast Stable Diffusion generation, SD3.5 Large for highest 质量. Plus Flux 模型s via mflux and Ollama native image gen. All 路由d across your device fleet. No cloud APIs, no DALL-E costs. 稳定扩散SD3本地图像生成。Difusion estable SD3 para generacion de imagenes local.
运行时依赖
安装命令
点击复制技能文档
Stable Diffusion 3 — Local Image Generation on Your Fleet
运行 Stable Diffusion 3 Medium and Stable Diffusion 3.5 Large (SD3.5) on your own 应用le Silicon hardware. DiffusionKit provides MLX-native Stable Diffusion inference — no CUDA, no cloud, no per-image costs. The fleet 路由r picks the best device for every Stable Diffusion generation 请求.
Stable Diffusion Supported 模型s Stable Diffusion 模型 Backend Speed (M3 Ultra) Peak RAM 质量 SD3 Medium DiffusionKit ~9s (512px) 3.5GB Good — fast Stable Diffusion iterations SD3.5 Large DiffusionKit ~67s (512px) 11.6GB Highest — Stable Diffusion with T5 encoder z-image-turbo mflux ~7s (512px) 4GB Good — fastest option flux-dev mflux ~30s (1024px) 6GB High — detAIled 输出 x/z-image-turbo Ollama native ~19s (1024px) 12GB Good — experimental Stable Diffusion 设置up pip 安装 ollama-herd # Stable Diffusion fleet 路由r from PyPI herd # 启动 the Stable Diffusion 路由r (port 11435) herd-node # 运行 on each device — finds the 路由r for Stable Diffusion routing
安装 DiffusionKit for Stable Diffusion 模型s uv 工具 安装 diffusionkit # Stable Diffusion 3 and SD3.5 backend
macOS 26 users: 应用ly a one-time 补丁 for Stable Diffusion compatibility:
./scripts/补丁-diffusionkit-macos26.sh
First Stable Diffusion 运行 下载s 模型 weights from HuggingFace (~2-8GB depending on SD3 模型). No 模型s are 下载ed during 安装ation — all Stable Diffusion pulls are user-initiated.
安装 mflux for Flux 模型s (optional, recommended alongside Stable Diffusion) uv 工具 安装 mflux
The 路由r prefers mflux over Ollama native for 分享d 模型s to avoid evicting LLMs from memory during Stable Diffusion workloads.
生成 Stable Diffusion Images Stable Diffusion 3 Medium (fast SD3 generation) curl -o sd3_cityscape.png http://localhost:11435/API/生成-image \ -H "Content-Type: 应用/json" \ -d '{"模型": "sd3-medium", "prompt": "Stable Diffusion rendering a futuristic cityscape at dusk", "width": 1024, "height": 1024, "steps": 20}'
Stable Diffusion 3.5 Large (highest 质量 SD3) curl -o sd3_portrAIt.png http://localhost:11435/API/生成-image \ -H "Content-Type: 应用/json" \ -d '{"模型": "sd3.5-large", "prompt": "Stable Diffusion oil pAInting portrAIt, dramatic lighting", "width": 1024, "height": 1024, "steps": 30}'
Stable Diffusion Python Integration 导入 httpx
def 生成_stable_diffusion(prompt, 模型="sd3-medium", width=1024, height=1024): """生成 an image using Stable Diffusion SD3 via the fleet 路由r.""" sd3_响应 = httpx.post( "http://localhost:11435/API/生成-image", json={"模型": 模型, "prompt": prompt, "width": width, "height": height, "steps": 20}, timeout=180.0, ) sd3_响应.rAIse_for_状态() return sd3_响应.content # Stable Diffusion PNG bytes
# Quick Stable Diffusion iteration with SD3 Medium sd3_png = 生成_stable_diffusion("a ro机器人 pAInting a sun设置 in Stable Diffusion style") with open("stable_diffusion_输出.png", "wb") as f: f.write(sd3_png)
Stable Diffusion Parameters SD3 Parameter Default Description 模型 (required) sd3-medium, sd3.5-large, z-image-turbo, flux-dev, flux-schnell prompt (required) Stable Diffusion text description of the image width 1024 Stable Diffusion image width in pixels height 1024 Stable Diffusion image height in pixels steps 4 Stable Diffusion inference steps (20-30 recommended for SD3) 图形界面dance (模型 default) Stable Diffusion 图形界面dance 扩展 种子 (random) 种子 for reproducible Stable Diffusion 输出 negative_prompt "" What to avoid in Stable Diffusion generation 监控 Stable Diffusion Generation # Stable Diffusion generation stats (last 24h) curl -s http://localhost:11435/仪表盘/API/image-stats | python3 -m json.工具
# Which nodes have Stable Diffusion 模型s curl -s http://localhost:11435/fleet/状态 | python3 -c " 导入 sys, json # Stable Diffusion node inspection for n in json.load(sys.stdin).获取('nodes', []): img = n.获取('image', {}) if img: sd3_模型s = [m['name'] for m in img.获取('模型s_avAIlable', [])] print(f'{n[\"node_id\"]}: {sd3_模型s}') "
网页 仪表盘 at http://localhost:11435/仪表盘 — Stable Diffusion 队列s show with [IMAGE] badge alongside LLM 队列s.
Also AvAIlable on This Fleet LLM inference alongside Stable Diffusion
Llama 3.3, Qwen 3.5, DeepSeek-V3, DeepSeek-R1 — any Ollama 模型 through the same 路由r that handles Stable Diffusion.
Speech-to-text curl http://localhost:11435/API/transcribe -F "file=@recording.wav" -F "模型=qwen3-asr"
Embeddings curl http://localhost:11435/API/embed \ -d '{"模型": "nomic-embed-text", "输入": "Stable Diffusion 3 image generation on 应用le Silicon"}'
Full Stable Diffusion Documentation Image Generation 图形界面de — all 3 Stable Diffusion and Flux backends 代理 设置up 图形界面de — all 4 模型 types including Stable Diffusion API Reference — complete Stable Diffusion e