English | 中文

TL;DR: ZAKO-V0.1 works like a die whose number of faces you can customize — the fewer tags you give, the more likely you are to roll a surprise (diversity); the more you give, the more likely you are to roll exactly the image you want (control). Too lazy to write prompts? Hit generate and leave the rest to it.

📌 Overview

ZAKO-V0.1 (Zero-Shot Anime Knowledge Optimizer) is an image prompt extender model obtained by supervised fine-tuning (SFT) on top of openbmb/MiniCPM5-2B. It expands Danbooru-style tags (general tags + character tags) into objective natural-language image descriptions, which can be filled directly into the image_description field of the Anima-Light-Lavender structured caption.

This release makes no architectural changes: the layer count and parameter count are identical to the base model; weights are distributed in GGUF format, and the model can be plugged directly into existing inference frameworks and workflows.

Item Description
Base model openbmb/MiniCPM5-2B (Llama architecture)
Parameters / Architecture Identical to the base model (~2.5B parameters, a 42-layer Llama); no added layers, no distillation
Task type text-generation: tags → natural-language image description (prompt extension)
Output length Up to 2048 tokens
Weight files zako-v0.1-bf16.gguf (BF16, unquantized) and zako-v0.1-q6_k.gguf (Q6_K quantized)
Training data ~1.7M Danbooru samples (same source as Anima-Light-Lavender)
License Apache-2.0 (inherited from the base model)

🎯 Use Cases

Best for ✅

  • Tag expansion: Expand a Danbooru tag list into a natural-language description with details such as composition, lighting, and materials; tag count is your control strength — from random exploration with a single tag to precise control with ~20 tags (see Section 5 of Quick Start).
  • Anima workflow companion: The output can be filled directly into the image_description field of the Anima-Light-Lavender structured caption, enabling a "tag input → natural-language-driven" generation pipeline.
  • Local / on-device deployment: The GGUF version loads directly in LM Studio and can run purely on CPU, with no Python environment setup.
  • Prompt generation for closed-source services: Chat directly on the LM Studio Chat page to expand prompts (see Section 6 of Quick Start), then paste the result into the prompt box of closed-source image generation services such as NovelAI.

Not suitable for ⛔

  • General chat / code / math: This model is fine-tuned only for prompt extension; general capabilities are out of its scope.
  • Direct image generation: This is a pure text-generation model; it must be paired with a text-to-image model that supports long natural-language input.
  • Photorealistic descriptions: The training data is Danbooru anime data, so the ability to describe realistic photography styles is limited.

🚀 Quick Start

Recommended setup: LM Studio (pure GUI) + ComfyUI — no command line or Python environment needed at any point. The model is distributed in GGUF format (two versions: BF16 / Q6_K); just follow the steps below.

1. Load the Model in LM Studio

LM Studio's My Models page only shows models that are already in its models directory, and there is no "Import File" button; to add a local GGUF, use either of the following methods:

Method A (no command line): On the Discover page (shortcut Ctrl + 2), search for the model name (e.g. ZAKO-V0.1), or paste this repository's Hugging Face URL directly into the search bar to download it.

Method B (place the local files manually):

  1. Download the GGUF weights from this repository and pick a version as needed:
    • zako-v0.1-bf16.gguf (BF16, unquantized — best quality, largest size);
    • zako-v0.1-q6_k.gguf (Q6_K quantized — smaller size, quality close to BF16; recommended).
  2. Create a two-level <publisher>/<model name>/ folder structure under the LM Studio models directory (the default directory is C:\Users\<username>\.lmstudio\models; use ZAKO-PE as the publisher and ZAKO-V0.1 as the model name), then put the GGUF file(s) inside (both versions can go into the same folder), for example:
    C:\Users\<username>\.lmstudio\models\ZAKO-PE\ZAKO-V0.1\zako-v0.1-q6_k.gguf
    
  3. Restart LM Studio, and the model appears on the My Models page (see the official docs: Import Models).

After that, select ZAKO-V0.1 in the model loader to finish loading.

2. Start the OpenAI-Compatible Server

On the Developer tab in LM Studio:

  1. Make sure the current model is ZAKO-V0.1;
  2. Click Start Server. The local server listens on http://127.0.0.1:1234 by default (the same as the ComfyUI node default, so no changes are needed);
  3. Keep the server running; all subsequent requests are handled by it.

3. Install the ComfyUI Custom Nodes

Install comfyui-zako-pe to get two nodes:

Node Purpose
Danbooru Caption JSON Assembles the structured caption: year / preference_level / artist / copyright / character / image_description / extra_tags
Danbooru Prompt Extend (OpenAI) Sends preference_level, image_description, and character from the document to the LLM, replaces image_description with the returned natural-language description, and outputs the final caption JSON

How to install: clone the repository into ComfyUI/custom_nodes/ and restart ComfyUI:

cd ComfyUI/custom_nodes
git clone https://github.com/aa0525/comfyui-zako-pe.git

If git is not installed, you can also click Code → Download ZIP on the repository page, extract it to ComfyUI/custom_nodes/comfyui-zako-pe/, and restart ComfyUI for it to take effect.

4. Load the Workflow

This repository ships with the workflow file anima-pe.json; drag it into the ComfyUI canvas to load it — no manual wiring needed. It is built on the Anima-Light-Lavender generation pipeline and already wires in the two nodes from this repository:

  • Danbooru Caption JSON assembles the structured caption; its document output → the document input of Danbooru Prompt Extend;
  • Danbooru Prompt Extend expands the tag-style image_description into natural language; its json output is used directly as the positive prompt.

Once loaded, simply fill in the fields in Danbooru Caption JSON and run; the expansion result is previewed via the PreviewAny node. The workflow loads anima-light-lavender_mxfp8.safetensors by default; if you only downloaded the BF16 version, switch to anima-light-lavender.safetensors in the Load Diffusion Model node.

When wiring it yourself, just follow the documentjson connection above. Keep the llm_url of the Danbooru Prompt Extend node at the default http://127.0.0.1:1234, which points to the local LM Studio server; if the server is not running, the node reports a connection error when executed.

Example values (Danbooru Caption JSON):

Parameter Example Value
year 2025
preference_level best
artist houkisei
copyright (leave empty)
character (leave empty)
image_description 1girl, solo, flower
extra_tags (leave empty)

After running, Danbooru Prompt Extend outputs a caption JSON structured as follows (image_description has been replaced by the LLM with a natural-language description; empty fields are omitted):

{
  "year": 2025,
  "preference_level": "best",
  "artist": ["houkisei"],
  "image_description": "The image features a young girl with an ethereal and delicate appearance, rendered in a soft, painterly style reminiscent of watercolor or faux-traditional media. She is depicted from the waist up, standing and looking directly at the viewer with a gentle smile.

Her hair is a light, silvery-white color, styled in long, flowing locks that cascade around her shoulders and chest. It appears to be slightly windswept, adding a dynamic quality to her pose. A few strands fall between her eyes, framing her face. Adorning her hair on the right side is a prominent blue flower, possibly a hydrangea, with intricate petals. Another smaller, darker blue flower is visible further back in her hair.

Her eyes are a striking shade of bright blue, large and expressive, conveying a sense of innocence and wonder. They are wide open, gazing forward with a slight upward tilt, as if she's just noticed something captivating. Her lips are slightly parted in a soft smile, revealing no teeth but suggesting a pleasant expression.

She wears a white dress that appears to be made of a light, flowing fabric, possibly linen or cotton, with subtle patterns or textures that give it depth. The dress has short sleeves and a high neckline. On the left shoulder of the dress, there's a decorative element resembling a cluster of dark blue flowers or leaves, similar in color to the flowers in her hair. Around her waist, a thin, golden-yellow cord or ribbon is tied, adding a touch of elegance to the garment. The dress also features a lace-up detail on the front, creating a corset-like effect.

Her hands are raised slightly, with her fingers gently curled. Her nails are painted a vibrant blue, matching the color of the flowers adorning her hair and dress. The skin on her hands and arms is fair and smooth, with subtle shading that gives them a soft, almost translucent quality.

The background is an outdoor scene, dominated by lush greenery and blooming flowers. There are numerous green leaves and stems, some with small, round buds or blossoms, creating a natural, garden-like environment. The foliage is rendered with varying shades of green and hints of blue, contributing to the overall cool and serene atmosphere. Scattered throughout the background are individual flower petals, some floating in the air, enhancing the dreamy quality of the image. The lighting suggests a bright, perhaps sunny day, with soft highlights on her hair and skin, and a gentle glow emanating from the upper left corner of the image."
}

5. Sampling Parameters and Input Format

Sampling parameters (recommended)

Parameter Recommended Value
temperature 1.0
top_p 0.95
max_tokens 2048

Danbooru Caption JSON parameters

Parameter Description
year Year anchor (integer), default 2025; set to 0 to omit the field
preference_level Dropdown: normal / high / very_high / best, default best
artist Artist / style tags, comma-separated; the ("name":1.1) weight syntax is preserved as-is
copyright Series / franchise tags, comma-separated
character Character tags, comma-separated
image_description Enter a tag list (comma-separated), not full natural language; it will be expanded into a natural-language description by the LLM
extra_tags Supplementary tags, comma-separated; omitted from the output if left empty

Danbooru Prompt Extend (OpenAI) parameters

Parameter Description
document Connect to the document output of Danbooru Caption JSON
llm_url OpenAI-compatible service URL, default http://127.0.0.1:1234 (local LM Studio server)
llm_model Leave empty to use the model already loaded on the server; or enter a model ID
llm_api_key Fill in if the server requires authentication; if empty, no Authorization header is sent
temperature / top_p / max_tokens Sampling parameters, default 1.0 / 0.95 / 2048
timeout Per-request timeout (seconds), default 300
result Generation result snapshot (display only; saved together with the workflow when saving an image; editing it does not affect generation)

Tag format and count (image_description)

  • Enter a Danbooru-style tag list (comma-separated), not full natural language.
  • Only preference_level, image_description, and character are sent to the LLM; year, artist, copyright, and extra_tags do not participate in expansion and are preserved as-is in the final JSON.
  • Tag count is your control strength — this is the core usage pattern of ZAKO-V0.1:
Number of Input Tags Effect
1 Random exploration (roll): the model freely expands composition, scene, and lighting around that tag, with the highest randomness
A few Follows more constraints while retaining creativity, tightening control step by step
~20 Precise control: composition, actions, clothing, materials, lighting, etc. can all be specified explicitly
Up to 80 You can keep adding details, but the control gains diminish (training inputs cover 1–80 tags)

6. Direct Chat Usage (Generating Prompts for Closed-Source Services Such as NovelAI)

You can use ZAKO-V0.1 without ComfyUI: chat directly on the LM Studio Chat page and copy the expansion result into the prompt box of image generation services such as NovelAI.

No need to write a prompt yourself — just send the following content to the model as-is:

  1. After loading ZAKO-V0.1, open the Chat page (shortcut Ctrl + N for a new conversation);

  2. Leave the system prompt empty;

  3. Paste the following into the input box (replace the tags line with your tag list; add a character line if you need to specify a character):

    # Role
    Act as an image prompt writer. Your goal is to transform inputs into **objective, physical descriptions**. You must convert abstract concepts into concrete scenes, specifying composition, lighting, and textures. Any text to be rendered must be enclosed in double quotes `""` with its typography described. Output **only** the final visual description.
    
    # User Input
    
    preference_level: best
    tags: 1girl, solo, flower
    
  4. After sending, the model outputs the natural-language description directly (no chain-of-thought);

  5. Use the copy button below the reply to paste the result into the prompt box of services such as NovelAI.

Sampling parameters can be adjusted in the settings panel of the LM Studio chat interface (recommended: temperature 1.0, top_p 0.95).

🖼️ Examples

All example prompts below were generated by ZAKO-V0.1; the images were generated by Anima-Light-Lavender.

🧠 Training Dynamics

Item Setting
Template MiniCPM5-2B no-thinking template (<think> markers excluded from training)
Sequence packing SFT sequence packing with a 4,096-token budget
Precision BF16
Optimizer Composite optimizer: 2D parameters of the MLP and Attention are updated by Muon (momentum 0.95, match_rms_adamw); all other parameters are updated by AdamW (β = 0.9 / 0.95, ε = 1e-8)
Learning rate 4e-5
Weight decay 1e-3
Gradient clipping 1.0
Effective batch size 1M tokens
Epochs 2

🔌 Compatibility

  • Distribution format: GGUF, with two versions — zako-v0.1-bf16.gguf (BF16, unquantized) and zako-v0.1-q6_k.gguf (Q6_K quantized). They can be loaded directly in runtimes such as LM Studio and llama.cpp, with no extra Python environment setup.
  • OpenAI-compatible API: The local LM Studio server provides a chat/completions endpoint; the ComfyUI node default http://127.0.0.1:1234 points to this service.
  • No chain-of-thought template: The model outputs the final description directly, without producing a reasoning process.

⚠️ Limitations

  • Anime-oriented descriptions: The training data is Danbooru anime data, so the ability to describe photorealistic photography and similar scenes is limited.
  • Limited richness of the training data: Constrained by the data pipeline budget, the information content of the training data still has plenty of room for improvement; extending extra capabilities on top of the existing data is not cost-effective, so the model is designed with simplicity and ease of use first.
  • Coherence with extremely short inputs: Also limited by the data, the patterns the model can learn are not rich enough; with extremely short tag inputs, the output is only guaranteed to be complete, and the narrative logic can be somewhat weak.

📜 License

The model weights inherit the Apache-2.0 license of the base model openbmb/MiniCPM5-2B.

🙏 Acknowledgements

Downloads last month
191
GGUF
Model size
3B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

6-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Johnny-Z/zako-pe

Finetuned
(45)
this model