ComfyUI-AnimaTool
[!NOTE] 今日更新
- 🎰 十连抽功能 — 支持
repeat/batch_size,一次出多张不是梦- 🔄 更换卡池功能 — 可以切换 UNET / CLIP / VAE 模型了,试试新卡池
- 📋 寻访记录功能 — 查看历史生成记录,支持 reroll 重新抽卡
✅ — 新增 免安装模式,一行配置连接远程 ComfyUI,无需本地环境 ✅ — ,支持 stdio + Streamable HTTP 传输
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
[!NOTE] 今日更新
- 🎰 十连抽功能 — 支持
repeat/batch_size,一次出多张不是梦- 🔄 更换卡池功能 — 可以切换 UNET / CLIP / VAE 模型了,试试新卡池
- 📋 寻访记录功能 — 查看历史生成记录,支持 reroll 重新抽卡
✅ — 新增 免安装模式,一行配置连接远程 ComfyUI,无需本地环境 ✅ — ,支持 stdio + Streamable HTTP 传输
AI Tool Use API for Anima anime/illustration image generation. Supports MCP Server, HTTP API, and CLI.
uvx✅ 工具调用体验修复 — Tool Use Fix,合并碎片消息、图片直接显示、Swipe 代理
[!TIP] Cherry Studio 现已支持 MCP 图片显示!
我们提交的 PR 已修复 Cherry Studio 对 MCPImageContent的处理。在官方合并之前,你可以使用预览版体验完整的 MCP 图片功能:
下载预览版 → Cherry Studio v1.7.17-preview
包含以下修复:
- 支持按助手单独配置是否将 MCP 工具图片发送给模型
- 修复 OpenAI 兼容提供商的 base64 图片数据处理
- 修复 Gemini 的 MCP 多模态工具结果转换
- 性能修复 v2:解决多轮出图后严重卡顿问题 — IPC 排除大 slice + base64 就地 strip(修复了 v1.7.16-preview2 中 Zod safeParse 克隆导致 strip 无效的问题)— 上游 PR #12766

repeat 参数提交多次独立任务(queue 模式),batch_size 在单任务内生成多张在 SillyTavern(酒馆)中使用 AnimaTool 生成图片?推荐安装以下配套插件:
ComfyUI-AnimaTool (本项目,MCP Server)
↕ MCP 协议 (stdio / streamable-http)
SillyTavern MCP Client (连接 + 工具注册)
↕ SillyTavern Tool Calling
Tool Use Fix (合并显示 + 体验优化)
如果你想训练自己的 LoRA/LoKr 来搭配 Anima 使用,推荐使用 AnimaLoraToolkit:
--config 加载,命令行参数可覆盖训练完成后,将 LoRA 放入 ComfyUI/models/loras/ 目录,即可通过本工具的 loras 参数加载使用。
使用 AnimaLoraToolkit 训练的画风+角色 LoKr,还原 Netflix 动画电影《超时空辉耀姬!》的 4K 剧场版画风:
@spacetime kaguya(画风)、cosmic princess kaguya(作品)如果你使用 Cherry Studio 作为 MCP 客户端,需要安装我们的预览版才能正确显示 MCP 返回的图片:
官方版 Cherry Studio 尚未合并此修复,使用官方版会导致图片显示为 base64 乱码,且多轮出图后会严重卡顿。
v1.7.17-preview 基于上游 v1.7.17,修复了出图后内存膨胀和 UI 冻结的问题(详情)。
cd ComfyUI/custom_nodes
git clone https://github.com/Moeblack/ComfyUI-AnimaTool.git
pip install -r ComfyUI-AnimaTool/requirements.txt
确保以下模型文件已放置到 ComfyUI 对应目录:
如果你只想连接一台正在运行的 ComfyUI(本机或云端),并且不想把本仓库放进 ComfyUI/custom_nodes/,可以使用独立 PyPI 包 comfyui-animatool(安装后使用命令 animatool-mcp)(仅通过 ComfyUI 标准 API:/prompt、/history/<id>、/view?... 工作)。
方式一:使用 uvx (推荐,无需安装)
无需手动安装 Python 包,直接在 Cursor 配置中使用 uvx 运行(需安装 uv):
(配置见下方 JSON)
方式二:使用 pip
pip install comfyui-animatool
方式三:源码安装 (开发用)
pip install -e ./animatool-mcp
在项目根目录创建 .cursor/mcp.json(以 uvx 为例):
{
"mcpServers": {
"anima-tool": {
"command": "uvx",
"args": ["--from", "comfyui-animatool", "animatool-mcp"],
"env": {
"COMFYUI_URL": "http://127.0.0.1:8188",
"ANIMATOOL_CHECK_MODELS": "false"
}
}
}
}
如果云端 ComfyUI 需要鉴权(反代/VPN/网关等),可额外设置:
ANIMATOOL_BEARER_TOKENANIMATOOL_HEADERS_JSON(自定义 Header JSON 字符串)该方式不依赖安装本 custom node;只要
COMFYUI_URL可访问即可。
在项目根目录创建 .cursor/mcp.json:
{
"mcpServers": {
"anima-tool": {
"command": "<PATH_TO_PYTHON>",
"args": ["<PATH_TO>/ComfyUI-AnimaTool/servers/mcp_server.py"]
}
}
}
示例(Windows):
{
"mcpServers": {
"anima-tool": {
"command": "C:\\ComfyUI\\.venv\\Scripts\\python.exe",
"args": ["C:\\ComfyUI\\custom_nodes\\ComfyUI-AnimaTool\\servers\\mcp_server.py"]
}
}
}
pip install mcp
http://127.0.0.1:8188画一个穿白裙的少女在花园里,竖屏 9:16,safe
图片会原生显示在聊天窗口中。
启动 ComfyUI 后,以下路由自动注册:
PowerShell:
$body = @{
aspect_ratio = "3:4"
quality_meta_year_safe = "masterpiece, best quality, newest, year 2024, safe"
count = "1girl"
artist = "@fkey, @jima"
tags = "upper body, smile, white dress"
neg = "worst quality, low quality, blurry, bad hands, nsfw"
} | ConvertTo-Json -Depth 10
Invoke-RestMethod -Uri "http://127.0.0.1:8188/anima/generate" -Method Post -Body $body -ContentType "application/json"
curl:
curl -X POST http://127.0.0.1:8188/anima/generate \
-H "Content-Type: application/json" \
-d '{"aspect_ratio":"3:4","quality_meta_year_safe":"masterpiece, best quality, newest, year 2024, safe","count":"1girl","artist":"@fkey, @jima","tags":"upper body, smile, white dress","neg":"worst quality, low quality, blurry, bad hands, nsfw"}'
cd ComfyUI-AnimaTool
pip install fastapi uvicorn
python -m servers.http_server
访问 http://127.0.0.1:8000/docs 查看 Swagger UI。
横屏: 21:9, 2:1, 16:9, 16:10, 5:3, 3:2, 4:3
方形: 1:1
竖屏: 3:4, 2:3, 3:5, 10:16, 9:16, 1:2, 9:21
当前版本会在 UNETLoader → KSampler(model) 之间链式注入
LoraLoaderModelOnly,因此只对 UNET 生效(不会改 CLIP)。
你的 LoRA 路径(示例):
G:\\AIGC\\ComfyUICommon\\models\\loras\\_Anima\\cosmic_kaguya_lokr_epoch4_comfyui.safetensors对应请求里 loras[i].name 应写为(相对 models/loras/):
_Anima/cosmic_kaguya_lokr_epoch4_comfyui.safetensors说明:ComfyUI 侧实际会校验
lora_name是否在GET /models/loras的返回列表里。
- Windows 环境下该列表通常是反斜杠路径(例如
_Anima\\cosmic_kaguya_lokr_epoch4_comfyui.safetensors)- 本项目会根据
/models/loras返回值自动规范化分隔符(你用/或\\都可以),但如果你直接在 ComfyUI 里手工填lora_name,请务必复制接口返回值。
{
"aspect_ratio": "3:4",
"quality_meta_year_safe": "newest, year 2024, safe",
"count": "1girl",
"character": "kaguya",
"series": "cosmic princess kaguya",
"artist": "@spacetime kaguya",
"appearance": "long hair, black hair, purple eyes",
"tags": "school uniform, smile, standing, looking at viewer",
"environment": "classroom, window, sunlight",
"nltags": "A cheerful girl stands by the window.",
"neg": "worst quality, low quality, blurry, bad hands, nsfw",
"loras": [
{
"name": "_Anima/cosmic_kaguya_lokr_epoch4_comfyui.safetensors",
"weight": 0.9
}
]
}
为了避免把整个 loras 目录无差别暴露给 MCP 客户端,本项目在 list_anima_models(model_type="loras") 时强制只返回存在同名 .json sidecar 元数据文件的 LoRA。
ComfyUI/models/loras/_Anima/cosmic_kaguya_lokr_epoch4_comfyui.safetensorsComfyUI/models/loras/_Anima/cosmic_kaguya_lokr_epoch4_comfyui.safetensors.json示例 sidecar 文件可参考:
sidecar JSON 的字段结构完全自定义,本项目只要求其为合法 JSON。
注意:要让 MCP 服务端读取该 sidecar,你还需要设置
COMFYUI_MODELS_DIR指向本机的 models 根目录(例如C:\\ComfyUI\\models;你的示例则是G:\\AIGC\\ComfyUICommon\\models)。远程 ComfyUI 场景通常无法读取远程文件系统,因此只支持“直接使用 loras 参数”,不支持 list。
@:如 @fkey, @jima,否则几乎无效safe / sensitive / nsfw / explicit@fkey, @jima(效果稳定)ComfyUI-AnimaTool/
├── __init__.py # ComfyUI extension(注册 /anima/* 路由)
├── executor/ # 核心执行器
│ ├── anima_executor.py
│ ├── config.py
│ ├── history.py # 生成历史管理器(内存 + JSONL 持久化)
│ └── workflow_template.json
├── knowledge/ # 专家知识库
│ ├── anima_expert.md
│ ├── artist_list.md
│ └── prompt_examples.md
├── schemas/ # Tool Schema
│ └── tool_schema_universal.json
├── servers/
│ ├── mcp_server.py # MCP Server(原生图片返回)
│ ├── http_server.py # 独立 FastAPI
│ └── cli.py # 命令行工具
├── assets/ # 截图等资源
├── outputs/ # 生成的图片(gitignore)
├── README.md
├── LICENSE
├── CHANGELOG.md
├── pyproject.toml
└── requirements.txt
所有配置都可以通过环境变量覆盖,无需修改代码:
{
"mcpServers": {
"anima-tool": {
"command": "C:\\ComfyUI\\.venv\\Scripts\\python.exe",
"args": ["C:\\ComfyUI\\custom_nodes\\ComfyUI-AnimaTool\\servers\\mcp_server.py"],
"env": {
"COMFYUI_URL": "http://127.0.0.1:8188",
"COMFYUI_MODELS_DIR": "C:\\ComfyUI\\models"
}
}
}
}
设置 COMFYUI_MODELS_DIR 后,生成前会自动检查模型文件是否存在:
"env": {
"COMFYUI_MODELS_DIR": "C:\\ComfyUI\\models"
}
如果缺少模型文件,会给出友好提示:
缺少以下模型文件:
- unet: diffusion_models/anima-preview.safetensors
- clip: text_encoders/qwen_3_06b_base.safetensors
请从 HuggingFace 下载:https://huggingface.co/circlestone-labs/Anima
并放置到 ComfyUI/models/ 对应子目录
远程 ComfyUI 场景:如果不设置 COMFYUI_MODELS_DIR,则跳过预检查(因为无法访问远程文件系统)。
如果 ComfyUI 不在本机运行:
局域网其他电脑:
export COMFYUI_URL=http://192.168.1.100:8188
Docker 容器访问宿主机:
export COMFYUI_URL=http://host.docker.internal:8188
WSL 访问 Windows:
export COMFYUI_URL=http://$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):8188
症状:Connection refused 或 无法连接到 ComfyUI
排查步骤:
http://127.0.0.1:8188COMFYUI_URLCOMFYUI_URL症状:H,W (xxx, xxx) should be divisible by spatial_patch_size 2
原因:分辨率不是 16 的倍数
解决:
aspect_ratio(如 16:9、9:16、1:1)width/height,确保是 16 的倍数(如 512、768、1024)症状:ComfyUI 控制台报 FileNotFoundError 或 Model not found
解决:确认以下文件存在:
pip install mcp(使用 ComfyUI 的 Python 环境)症状:等待很久后报 TimeoutError
可能原因:
steps 设置过高解决:
export ANIMATOOL_TIMEOUT=1200steps: 25(默认值)确保使用的是最新版本,旧版本可能存在事件循环阻塞问题。
mcp(MCP Server)、requests(可选,HTTP 请求)AGPL-3.0 License - see LICENSE for details.
欢迎提交 Issue 和 Pull Request!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)AI Tool Use API for Anima anime/illustration image generation. Supports MCP Server, HTTP API, and CLI.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
ComfyUI AnimaTool ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-11-05 AI Tool Use API for Anima anime/illustration image generation. Supports MCP Server, HTTP API, and CLI.