Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-Anima-Prompt-Rewriter

ComfyUI Extension: ComfyUI-Anima-Prompt-Rewriter

Repo Name

ComfyUI-Anima-Prompt-Rewriter

Author
sinanzoo2nd (Account age: 299 days)
Nodes
View all nodes(1)
Latest Updated
2026-05-19
Github Stars
0.0K

How to Install ComfyUI-Anima-Prompt-Rewriter

Install this extension via the ComfyUI Manager by searching for ComfyUI-Anima-Prompt-Rewriter
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Anima-Prompt-Rewriter in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-Anima-Prompt-Rewriter Description

ComfyUI-Anima-Prompt-Rewriter turns separate character, background, and action tags into clear English image prompts using a local LLM or server, with a manual-prompt fallback if rewriting fails.

ComfyUI-Anima-Prompt-Rewriter Introduction

ComfyUI-Anima-Prompt-Rewriter is a custom ComfyUI node that turns lists of character and background tags into a natural-language English image prompt. It uses a local language model, or LLM, to describe who is in a scene, what each character looks like, and what is happening.

This is particularly useful when you work with two characters. A tag list can leave it unclear which hair color, outfit, or action belongs to which person. By giving the rewriter separate inputs for each character, the background, and the scene, you give it a better chance of expressing those relationships clearly. Clearer wording may reduce concept bleeding, where one character picks up another character’s features, although the final image still depends on your image model and workflow.

The node also gives you a way to keep working without a rewrite. When rewriting is switched off, or when it cannot produce a result, it passes your manual prompt and original tags to its outputs.

How ComfyUI-Anima-Prompt-Rewriter Works

Think of the node as a scene-description assistant. You provide the ingredients in separate groups:

  • Character 1 tags: What the first person looks like.
  • Character 2 tags: What the second person looks like.
  • Background tags: Where the scene takes place and what surrounds the characters.
  • Scene and action: What is happening and how the characters interact.

For example, separate tags for a red-haired character, a black-haired character, a café, and a shared action give the language model more context than one undivided list. It can then write a sentence that names each character and describes the setting and action. The result is an English text prompt, not an image; you connect that text to the later prompt-processing nodes in your ComfyUI workflow.

The node can obtain the rewrite in two ways:

  • Local model: It loads a selected .gguf language-model file within ComfyUI to generate the text. Afterward, it attempts to release the model and clear cached GPU memory so the image-generation steps have more room to run.
  • Local API server: It sends the request to a running llama-server at 127.0.0.1:8080 and receives the generated text. This keeps the language model outside the ComfyUI process, but the server can still use your computer’s memory and GPU resources.

The node checks for the server and supports a fallback when rewriting is unavailable. Neither approach guarantees that an image will be free of mixed-up attributes or memory errors.

ComfyUI-Anima-Prompt-Rewriter Features

Separate inputs for clearer scenes

The char_1_tags, char_2_tags, background_tags, and scene_and_action inputs keep different parts of your idea distinct. When preparing a two-person scene, put each person’s appearance in their own character input and use scene_and_action for their interaction. This gives the rewriter a clearer basis for assigning details in its prose.

Control over the rewrite

InputWhat it doesWhen you might change it
enable_llmTurns language-model rewriting on or off.Turn it off to use your manual prompt and original tags instead.
manual_promptSupplies the text sent to final_prompt when rewriting is off or falls back.Write your own detailed description when you want direct control over the wording.
model_choiceSelects an available .gguf model or the API-server option.Try a different model if the prose or resource use does not suit your workflow.
temperatureAdjusts how varied the model’s wording may be. The documented default is 0.1.Keep it low for more consistent tag-to-prose rewriting; a higher value may produce more variation.
top_pAdjusts the range of word choices considered during generation. The documented default is 0.9.Change it if you are experimenting with how predictable or varied the result feels.
system_promptGives the language model its overall instructions, such as how to act as a prompt rewriter.Refine the instructions when you need a different writing approach.

Changing temperature, top_p, or system_prompt can affect the text the LLM writes, but the exact effect depends on the model you choose.

Model discovery

The node looks for .gguf files in ComfyUI’s models/LLM folder, including its subfolders, and displays discovered files in the model_choice menu using shorter paths such as LLM/gemma.gguf. The original documentation says the folder is created automatically if it does not already exist. A model file must still be present for local rewriting.

Fallback and output routing

The node has four text outputs. Their contents change depending on whether the rewrite succeeds:

OutputWhen rewriting succeedsWhen rewriting is off or fails
final_promptThe generated English description.Your manual_prompt.
char_1_rawEmpty text ("").The original Character 1 tags.
char_2_rawEmpty text ("").The original Character 2 tags.
background_rawEmpty text ("").The original background tags.

Emptying the raw-tag outputs after a successful rewrite helps prevent those tags from being added a second time later in your workflow. If rewriting cannot run, the fallback preserves those three tag groups for a workflow that combines raw tags. There is no separate scene_and_action raw output in the documented output list, so check how your workflow handles that input when relying on fallback.

ComfyUI-Anima-Prompt-Rewriter Models

The extension does not list bundled models. Instead, model_choice can show the .gguf files available in your ComfyUI models/LLM folder, as well as an API-server choice. The original documentation mentions Gemma-2-9B and Llama-3-8B as examples of model families, not as models included with the extension.

A .gguf file is a format used to run a language model locally. A quantized version, such as a Q4 file, generally uses less memory than a larger version of the same model, though its writing may differ. The original documentation suggests considering models in roughly the 4B–8B size range with Q4–Q8 quantization. Choose according to the memory available on your computer and the quality you prefer in test rewrites.

The [API] LLAMA-SERVER (127.0.0.1:8080) choice uses the model already running in that local server. Selecting it does not choose or start a server model for you. If you compare results between a local-file choice and the API choice, remember that the underlying models may be different.

Troubleshooting ComfyUI-Anima-Prompt-Rewriter

I get an out-of-memory error

  1. Check whether you are using a local .gguf model while your image-generation model also needs GPU memory.
  2. Try a smaller model file, such as a Q4-quantized version.
  3. If you use llama-server, check its GPU memory use as well. Running it separately from ComfyUI does not remove its hardware requirements.
  4. Run the workflow again and watch the ComfyUI console to see which step reports the error.

The node attempts to free resources after a local rewrite, but available memory still depends on the models and other programs you are running.

My model does not appear in model_choice

  1. Confirm that the file is in ComfyUI/models/LLM or one of its subfolders.
  2. Check that its filename ends in lowercase .gguf, as specified in the original documentation.
  3. Reopen or refresh the node’s model choices after placing the file, and check whether the model appears.

The API choice falls back instead of rewriting

  1. Confirm that the llama-server process is running and has loaded a model.
  2. Check that it is listening on port 8080, which is the port the node expects.
  3. Check that local connections to 127.0.0.1 are not being blocked.
  4. Look at the server and ComfyUI console messages for a more specific error.

The rewrite does not appear in my image prompt

  1. Check that enable_llm is on and that final_prompt is connected to the part of your workflow that processes the prompt.
  2. Inspect the node’s outputs. If final_prompt contains your manual_prompt and the raw-tag outputs contain tags, the node is using its off/fallback route.
  3. Check the ComfyUI console for progress or error messages, then verify the selected model or server.

Frequently asked questions

Can I use the node without an LLM rewrite?
Yes. Set enable_llm to off. The node passes manual_prompt to final_prompt and preserves the documented raw-tag outputs.

Will it prevent every character detail from getting mixed up?
No. Separating character inputs and rewriting them as clear sentences can help, but the image model may still interpret a prompt differently than you intend.

Why are my raw-tag outputs empty?
That is the documented behavior after a successful rewrite. It helps avoid including the same details twice when later nodes combine text.

Does the API option make GPU memory problems impossible?
No. The language model runs outside ComfyUI, but the server may still use the same GPU and compete for its memory.

Learn More about ComfyUI-Anima-Prompt-Rewriter

If you want to understand the separate-server option, the llama.cpp project is the resource linked in the original documentation. For day-to-day art workflows, the most useful way to assess this node is to compare a few rewrites against your original tags: check whether each character keeps the right attributes, whether the action is clear, and whether the resulting image matches your intended scene.

ComfyUI-Anima-Prompt-Rewriter Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-Anima-Prompt-Rewriter detailed guide | ComfyUI