MCPcopy Index your code
hub / github.com/ShiroEirin/comfyui-good-anima

github.com/ShiroEirin/comfyui-good-anima @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
194 symbols 500 edges 22 files 16 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ComfyUI Good Anima 🎨

A collection of AI Agent Skills for ComfyUI + Anima anime-style image generation. The active mainline is v2mini: it removes multi-agent-style routing and keeps only the core Anima constraints, Danbooru tag validation, and ComfyUI execution chain, leaving more creative space to the user and the AI model.


🌐 中文版

Anima Base v1.0 preview


Mainline Features

  • Back to basics: v2mini no longer depends on master / composition-director / random-gen multi-layer routing. Anima generation enters through comfyui-animatool.
  • Creative space stays with the user and model: Skills do not replace taste, composition sense, or character understanding. They only guard the hard boundaries that often fail in Anima workflows.
  • Must-keep facts: Anima prompt order, tag/nltags separation, dual-LoRA quality prefix, dynamic negative prompts, workflow args, seed behavior, non-blocking submit, and PowerShell JSON encoding.
  • Hard-anchor validation: Characters, series, artists, outfits, props, and other anchors are validated with danbooru-tags instead of guessed from memory.
  • Pure execution layer: comfyui-manager only executes prepared workflows and args. It never writes prompts, chooses artists, or decides composition.
  • On-demand references: Failure patterns and artist-style research stay in references and are loaded only when needed.

Architecture

v2mini uses a three-part chain:

Tier Component Role Load Timing
L1 — Entry comfyui-animatool Visual brief, prompt assembly, conflict checks, args output On Anima generation
L2 — Validation danbooru-tags Tag lookup, canonical validation, random candidates When hard anchors are needed
L3 — Execution comfyui-manager validate / submit / run / troubleshooting / output caching After args are ready

The chain does not create route contracts or split user intent into excessive workflow layers. The model understands the image first; skills keep Anima and ComfyUI rules stable.


Skill Structure

comfyui-good-anima/
├── README.md
├── README_EN.md
├── comfyui-animatool/
│   ├── SKILL.md                # Single Anima entry: visual brief, tag/nltags split, prompt + args
│   └── references/
│       └── anima-reference.md  # Artist style research + failure/anatomy/attribution troubleshooting (on-demand)
├── danbooru-tags/
│   ├── SKILL.md                # Danbooru tag lookup and validation
│   ├── bin/danbooru-tags.exe   # Prebuilt Rust CLI
│   ├── anima-1.0.csv           # Main Anima tag index
│   ├── Anima-preview.csv
│   ├── Anima-preview-alternate.csv
│   ├── tags_index.json
│   ├── tags_index.sqlite
│   ├── *.py                    # Index build scripts
│   └── rust-cli/               # danbooru-tags Rust source
├── comfyui-manager/
│   ├── SKILL.md                # ComfyUI execution and operations
│   ├── workspace/              # workflow JSON + execution scripts
│   │   ├── config.json
│   │   ├── run_workflow_args.js
│   │   ├── cache_anima_outputs.js
│   │   └── data/
├── samples/
├── legacy/v1/                  # V1 archive, tracked for historical reference
├── legacy/V3/                  # V3 local sealed archive, not committed
└── LICENSE

Version Archive Rules

  • The active mainline is v2mini only: comfyui-animatool, danbooru-tags, and comfyui-manager.
  • legacy/v1/ is an early hard-constraint chain archive, kept for regression comparison, not used as the runtime entry.
  • legacy/V3/ is a local sealed archive. Do not commit it and do not use it as the skills root.
  • New core rules go into the three main skills first; failure handling and artist research stay in comfyui-animatool/references/.

Compatible AI Assistants

These Skills are designed for AI Coding Agents that can execute shell commands:

Assistant Status Notes
🟢 Snow ✅ Full Support Recommended for Chinese users — native Skills system support, plug & play
🟢 Claude Code ✅ Full Support Anthropic official CLI with shell execution
🟢 Codex ✅ Full Support Full-featured AI coding agent, fully compatible
🟢 PI ✅ Full Support Lightweight AI coding agent, Skills system support
🟢 OpenClaw ✅ Supported Works with ComfyUI_Skill_CLI integrated agents
🟡 Other AI Agents ✅ Full Support Any agent capable of PowerShell/Shell commands

💡 Recommended: Snow — the best AI coding agent experience in China, with native Skills system support, ComfyUI integration, and Chinese language optimization.


🔍 What is danbooru-tags and why is it needed?

danbooru-tags is the core retrieval infrastructure of this project. It's a Rust CLI tool that performs high-speed searches and anchor validation against the official Anima tag index (anima-1.0.csv).

Problems it solves

Anima is trained on the Danbooru tagging system — precise control requires using valid Danbooru tags. With millions of tags, manual memorization is impossible. danbooru-tags solves:

Problem Without danbooru-tags With danbooru-tags
Artist validation "Use rella style" → AI doesn't know if @rella is valid --group artist --prefix "@rella" returns confirmed artist
Character lookup "立华奏" in Danbooru is kanade tachibana — AI might guess wrong --group character --keyword "kanade tachibana" hits precisely
Tag accuracy "巫女服" is not a valid Danbooru tag Decompose into miko, hakama, wide sleeves candidates
Random selection Can't randomly pick from valid tags --random N --json returns candidates; generation fill uses --random 5 --for-prompt
Batch queries One query per tag, slow and inefficient --batch-file handles 12-16 queries at once, 8 threads

How it works

anima-1.0.csv (official index)
       ↓
 build_index.py + sqlite_index.py (build index)
       ↓
tags_index.sqlite (fast local index)
       ↓
 bin/danbooru-tags.exe (Rust CLI)
       ↓
 AI agent queries via --group / --random / --batch-file
 obtains confirmed_tags / candidate_tags for prompt assembly

Is it essential?

Yes. Without danbooru-tags, the AI agent cannot verify artist names, check character tag spelling, or ensure randomly selected tags are within Anima's comprehension. The entire generation pipeline becomes "blind prompting, gambling on outputs" — losing all precision control.


🖼️ Sample Gallery

Example images generated with ComfyUI Good Anima + Anima base v1.0 (artist: rella):

Image Description
Komachi & Eiki Touhou Project — Onozuka Komachi & Shiki Eiki, Flower Viewing theme
Yoshika & Seiga Touhou Project — Miyako Yoshika & Kaku Seiga, Ten Desires theme
Yukari & Ran Touhou Project — Yakumo Yukari & Yakumo Ran, Perfect Cherry Blossom theme

🖥️ System Requirements

Dependency Version Notes
OS Windows 10/11 PowerShell 5.x+, uses Windows PowerShell syntax
ComfyUI Latest Image generation backend
comfyui-skill-cli Latest ⚠️ Core dependency — bridge between AI agent and ComfyUI
Node.js 18+ For workflow execution scripts
Python 3.10+ Only for tag index initialization, not needed for daily use
NVIDIA GPU 8GB+ VRAM 12GB+ recommended, for Anima inference and RTX VSR upscaling
CUDA 12.8+ GPU acceleration required
PyTorch CUDA 12.8 compatible Use with xformers 0.0.3.0
xformers 0.0.3.0 Memory optimization

ComfyUI Startup Recommendation

Enable Sage Attention mode for best performance (requires ANIMA_BOOSTER):

python main.py --use-sage-attention

Or add --use-sage-attention to ComfyUI startup parameters. The AnimaBoosterLoader node can also set sage_attention to enabled.

Note: Default sampler uses dpmpp_2m_sde_gpu + beta57 scheduler. beta57 comes from the RES4LYF node pack — install it separately. Alternatives: beta or ddim_uniform.


⚡ Core Dependency: comfyui-skill CLI

The most important component in the entire pipeline. Without it, AI coding assistants (Snow / Codex) cannot communicate with local ComfyUI or execute workflows.

Project Link
GitHub Repo HuangYuChuh/ComfyUI_Skill_CLI
PyPI Package comfyui-skill-cli
pip install comfyui-skill-cli

After installation, the AI agent can use the comfyui-skill command to list models, import workflows, generate images, and manage queues. It's not limited to Anima — any ComfyUI workflow (Guanghui, SDXL, FLUX, image editing, video generation, etc.) can be orchestrated through it.


📦 Model Installation

Place the following model files in ComfyUI's models/ directory:

Base Model (UNet)

File Location Size Source
anima-base-v1.0.safetensors ComfyUI/models/diffusion_models/ ~12.2 GB circlestone-labs/Anima

CLIP (Text Encoder) & VAE

File Location
qwen_3_06b_base.safetensors ComfyUI/models/text_encoders/
qwen_image_vae.safetensors ComfyUI/models/vae/

LoRAs (Dual Aesthetic Enhancement)

File Location Purpose
anima-highres-aesthetic-boost.safetensors ComfyUI/models/loras/ Official LoRA — primarily for stable high-resolution (1536-2048px) generation, aesthetic boost is subtle. CivitAI
anima-base-1-masterpiece-v51.safetensors ComfyUI/models/loras/ Aesthetic quality modifier, trigger words: masterpiece very aesthetic. Author's recommended structure: masterpiece, best quality, very aesthetic. CivitAI

Model Source: circlestone-labs/Anima — jointly released by CircleStone Labs and Comfy Org. Training data cut-off: September 2025.

Quality Prefix

The defau

Core symbols most depended-on inside this repo

normalize_loose_text
called by 10
danbooru-tags/rust-cli/src/text_match.rs
contains_word_phrase
called by 10
danbooru-tags/rust-cli/src/text_match.rs
normalize_search_text
called by 8
danbooru-tags/rust-cli/src/text_match.rs
readJson
called by 6
legacy/v1/comfyui-manager/workspace/cache_anima_outputs.js
argValue
called by 5
comfyui-manager/workspace/cache_anima_outputs.js
readJson
called by 5
comfyui-manager/workspace/cache_anima_outputs.js
argValue
called by 5
legacy/v1/comfyui-manager/workspace/cache_anima_outputs.js
normalize_for_sql
called by 4
danbooru-tags/sqlite_index.py

Shape

Function 179
Class 14
Method 1

Languages

Rust51%
TypeScript37%
Python12%

Modules by API surface

comfyui-manager/workspace/cache_anima_outputs.js24 symbols
legacy/v1/comfyui-manager/workspace/cache_anima_outputs.js22 symbols
danbooru-tags/rust-cli/src/search.rs21 symbols
danbooru-tags/rust-cli/src/text_match.rs15 symbols
danbooru-tags/rust-cli/src/types.rs13 symbols
danbooru-tags/rust-cli/src/db.rs13 symbols
comfyui-manager/workspace/run_workflow_args.js10 symbols
legacy/v1/danbooru-tags/sqlite_index.py9 symbols
legacy/v1/comfyui-manager/workspace/run_workflow_args.js9 symbols
danbooru-tags/sqlite_index.py9 symbols
danbooru-tags/rust-cli/src/prompt.rs9 symbols
danbooru-tags/rust-cli/src/cli.rs8 symbols

For agents

$ claude mcp add comfyui-good-anima \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact