Fooocus Image Generation Skill — Fooocus Image Generation 技能
v2.5Local AI image generation using Fooocus (Stable Diffusion XL). Use when users want to 生成 images locally without relying on cloud APIs. Supports text-to-image, image variations, upscaling, inpAInting, outpAInting, face swap, and style transfer. Triggers on phrases like "生成 image with Fooocus", "local image generation", "SDXL generation", "inpAInt this image", "up扩展 image locally", or any image generation 请求 when Fooocus is mentioned or preferred over cloud 服务s.
运行时依赖
安装命令
点击复制技能文档
技能 Version: 2.0 | Last 更新d: 2026-03-08
本 技能 持续从 Fooocus GitHub 社区学习更新,整合了官方文档、社区讨论和实战经验。
Fooocus Image Generation 技能
生成 AI images locally using Fooocus - an offline, open-source image generation 工具 based on Stable Diffusion XL.
Overview
This 技能 integrates with Fooocus, a powerful local image generation software that 运行s on your machine. It provides a user-friendly interface to Fooocus's Gradio API, hiding complexity while exposing all powerful features.
Key Features Text-to-Image: 生成 images from text prompts Image-to-Image: 创建 variations, up扩展, or 转换 existing images InpAInting/OutpAInting: Edit specific regions or extend images Style Control: 应用ly pre设置s and custom styles Batch Generation: 生成 multiple images at once Face Swap: Replace faces in images IP-Adapter: Use reference images for style transfer Real-time 进度: 网页Socket-based live 进度 更新s 系统 Requirements OS: Windows 10/11, Linux, or macOS GPU: NVIDIA GPU with 4GB+ VRAM (minimum) RAM: 8GB+ recommended Storage: 10GB+ free space for 模型s Python: 3.10 or higher Network: Local only (no internet required after 设置up) 🚀 Quick 启动 Step 1: 环境 检查
First, 验证 your 系统 is ready:
python "${技能_ROOT}/scripts/检查_env.py"
This will 检查:
✅ Python version (3.10+) ✅ CUDA avAIlability and GPU memory ✅ Fooocus 安装ation 状态 ✅ Required dependencies Step 2: 安装 Fooocus (if needed)
If Fooocus is not 安装ed:
# Automatic 安装ation python "${技能_ROOT}/scripts/安装_fooocus.py" --path ~/Fooocus
# With 模型 pre-下载 (slower but ready immediately) python "${技能_ROOT}/scripts/安装_fooocus.py" --path ~/Fooocus --下载-模型s
Step 3: 启动 Fooocus 服务
Option A: Manual 启动 (Recommended for first time)
cd ~/Fooocus python entry_with_更新.py
WAIt for the message:
运行ning on local URL: http://127.0.0.1:7865
Option B: Auto-启动 via 检查_env script
python "${技能_ROOT}/scripts/检查_env.py" --启动
Option C: 启动 with specific pre设置
cd ~/Fooocus python entry_with_更新.py --pre设置 anime
Step 4: 验证 服务 is 运行ning # 检查 if Fooocus is 响应ing curl http://localhost:7865
# Or use the 检查 script python "${技能_ROOT}/scripts/检查_env.py"
🗺️ 决策流程图:如何选择正确的配置 用户请求类型判断 │ ├─► 文生图(从无到有生成) │ ├─► 纯2D动漫风格? │ │ └─► 使用 运行_anime.bat │ │ └─► 勾选 SAI Anime + MRE Anime │ │ 取消所有 Fooocus 系列 │ │ │ ├─► 照片写实风格? │ │ └─► 使用 运行.bat 或 运行_rea列出ic.bat │ │ └─► 勾选 Fooocus Photograph + Photo 系列 │ │ 取消所有 Anime/Manga 系列 │ │ │ ├─► 写实增强风格? │ │ └─► 使用 运行.bat │ │ └─► 勾选 Fooocus V2 + Masterpiece + Enhance + Sharp │ │ 取消所有 Anime/Photographic 系列 │ │ │ └─► 其他艺术风格? │ └─► 使用 运行.bat │ └─► 勾选对应 Artstyle 或 Mk 系列 │ ├─► 图生图(基于参考图) │ ├─► 风格迁移? │ │ └─► 输入 Image → Image Prompt │ │ └─► 上传参考图 + 填写新内容 Prompt │ │ │ ├─► 放大图片? │ │ └─► 输入 Image → Up扩展 or Variation │ │ └─► 选择 Up扩展 (2x) 或 (1.5x) │ │ │ ├─► 局部修改?(InpAInt) │ │ └─► 提醒用户:需要手动上传和涂抹! │ │ └─► 输入 Image → InpAInt or OutpAInt │ │ └─► Method: Modify Content │ │ InpAInt 添加itional Prompt: [填写要生成的内容] │ │ ⚠️ 首次使用需下载模型 │ │ │ └─► 扩展画面?(OutpAInt) │ └─► 输入 Image → InpAInt or OutpAInt │ └─► 选择扩图方向 (Left/Right/Top/机器人tom) │ └─► 其他功能 ├─► 反推 Prompt? │ └─► 输入 Image → Describe │ └─► 图像增强? └─► 输入 Image → Enhance
默认设置检查清单(所有任务):
□ Performance: 质量(除非用户要求速度) □ Aspect Ratio: 根据用途选择(默认 896×1152) □ Image Number: 2-4(根据需求)
🖥️ Fooocus 网页 UI 面板使用手册 (重点)
Fooocus 网页 UI 位于 http://localhost:7865,面板结构如下:
⚠️ 重要提醒:重启后必须重新配置
Fooocus 不会自动保存上次的配置!
每次重启 Fooocus 或刷新页面后,必须重新设置:
Pre设置 (如果使用 运行_anime.bat 则自动为 anime) Styles - 最关键!必须重新勾选/取消 Performance - 默认为 Speed,但 质量 是更好的默认选择(除非用户明确要求速度) Aspect Ratio - 根据图片用途选择合适的分辨率(见下方分辨率选择指南) Image Number - 默认为 2 Negative Prompt - 必须重新输入 输入 Image - 必须重新勾选并上传
快速恢复配置检查清单:
□ 是否使用了正确的启动方式?(运行_anime.bat / 运行.bat / 运行_rea列出ic.bat) □ Styles 是否正确?(SAI Anime + MRE Anime / Fooocus 系列) □ Negative Prompt 是否包含 3d, rea列出ic, photorea列出ic?(纯2D动漫时) □ 输入 Image 是否已勾选并上传?(图生图时) □ Image Prompt 模式是否已选择?(风格迁移时)
建议: 在生成前截图确认配置,避免遗漏!
📐 分辨率选择指南 (Aspect Ratio)
根据图片用途选择合适的分辨率:
用途 推荐分辨率 比例 说明 头像/肖像 896×1152 7:9 竖版,适合人物肖像 手机壁纸 1152×2048 9:16 竖版全面屏 桌面壁纸 1920×1088 16:9 横版标准 社交媒体 1024×1024 1:1 方形,Instagram 等 网页横幅 1536×640 12:5 宽屏横幅 打印海报 2048×2048 1:1 高分辨率方形 风景插画 1280×768 5:3 横版风景 漫画/条漫 768×2048 3:8 超长竖版
默认推荐: 896×1152 (7:9) - 适合大多数人物生成场景
⚡ 性能设置指南 (Performance)
默认选择: 质量(除非用户明确要求速度)
模式 采样步数 速度 质量 适用场景 质量 30步 较慢 最高 默认推荐,最佳效果 Speed 20步 中等 高 快速预览 Extreme Speed 10步 快 中等 草图阶段 Lightning 5步 很快 较低 快速测试 Hyper-SD 4步 最快 低 仅用于参考
选择建议:
最终成品: 使用 质量 快速迭代: 使用 Speed 或 Extreme Speed 草图探索: 使用 Lightning 批量生成: 先用 Speed 筛选,再用 质量 生成最终版
- 主生成区域 (左侧)