Anima NAIA Random Prompt
Pull a random prompt from your local NAIA service
- prompt
- negative_prompt
- width
- height
The name is the confusing part: "NAIA" isn't this pack's invention, it's a separate local service that generates random anime prompts - prompt, negative prompt, and resolution in one response. Anima NAIA Random Prompt is the node that talks to it: one click and a fresh NAIA-generated prompt lands in your workflow. If you've seen other packs reference comfyui-naia-bridge, this is the same style of API, reimplemented without importing or overriding that pack - you can install both.
What it does
Four outputs: prompt, negative_prompt, width, and height, straight from NAIA's POST /api/comfyui/random endpoint (default 127.0.0.1:7243). The inputs are mostly switches and cached values:
use_naia_bridge- false bypasses NAIA entirely and returns the input values as-is. Handy for keeping ComfyUI's cache stable when you're iterating on everything except the prompt.freeze_naia_output- true reuses the cached output when it's valid, skipping the API call. This is the "reproduce the same result" mode.override_prompt/override_negative/override_width/override_height- per-value overrides: when false, the matching NAIA value is ignored and your input passes through.show_preview- toggles the large read-only preview widget on the node.
The long tail of inputs (use_naia_settings, pre_prompt, post_prompt, auto_hide, the remove_* preprocessing toggles, host, port) are legacy workflow-schema compatibility values. The backend doesn't read them - global EasyUse Anima settings handle host, port, prompt-engineering, and preprocessing now. Don't touch them; they exist so old workflows keep loading.
The cache story, which is the real feature
NAIA output is random by nature, which is great for inspiration and terrible for reproducibility. This node solves that with cached_prompt, cached_negative_prompt, cached_width, cached_height, and cached_signature inputs: the last good response is stored, and with freeze_naia_output on, a valid cache wins over a fresh call. Saved-image workflows are written with frozen output enabled, so re-running them reproduces the exact prompt that produced the image. If you want fresh randomness, turn freezing off.
Security posture worth knowing
NAIA is treated as localhost-only by default. The default host is 127.0.0.1, and non-local hosts are blocked unless you explicitly enable "EasyUse Anima → NAIA → Allow remote API" in settings. That's the right default - NAIA serves prompts over an API with no auth, and you don't want that reachable on your LAN by accident.
Install and gotchas
Pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/n0va39/ComfyUI-EasyUseAnima
cd ComfyUI-EasyUseAnima && pip install -r requirements.txt
Restart ComfyUI; Manager: "ComfyUI EasyUse Anima". The NAIA service itself is a separate install - this node is just the client.
Gotchas: if the node returns your inputs unchanged when you expect NAIA output, check override_* and use_naia_bridge before blaming the service. If the preview shows stale text, freeze_naia_output is doing its job - that's cached output, not a bug. And remember translation defaults off and this pack never reads API keys from environment variables; if you expected a key to work, that's not how it's wired.
Inputs (37)
| Name | Type | Default | Description |
|---|---|---|---|
| use_naia_bridge | BOOLEAN | true | false: bypass NAIA and return prompt/negative_prompt/width/height as-is. This mode keeps ComfyUI cache stable when inputs are unchanged. |
| freeze_naia_output | BOOLEAN | false | true: if cached output is valid, return it without calling NAIA. Saved-image workflows are written with this enabled. |
| show_preview | BOOLEAN | true | Show the large read-only preview widget in the node UI. |
| cached_prompt | STRING | Stored prompt used for frozen output and saved-image reproduction. | |
| cached_negative_prompt | STRING | Stored negative prompt used for frozen output and saved-image reproduction. | |
| cached_width | INT | 00–8192 | Stored width used for frozen output and saved-image reproduction. |
| cached_height | INT | 00–8192 | Stored height used for frozen output and saved-image reproduction. |
| cached_signature | STRING | Internal signature for validating cached output. | |
| prompt | STRING | Returned as-is when bypassed or when override_prompt is false. | |
| override_prompt | BOOLEAN | true | true: use NAIA prompt. false: preserve input prompt. |
| negative_prompt | STRING | Returned as-is when bypassed or when override_negative is false. | |
| override_negative | BOOLEAN | true | true: use NAIA negative prompt. false: preserve input negative_prompt. |
| width | INT | 102464–8192 | Returned as-is when bypassed or when override_width is false. |
| override_width | BOOLEAN | true | true: use NAIA width. false: preserve input width. |
| height | INT | 102464–8192 | Returned as-is when bypassed or when override_height is false. |
| override_height | BOOLEAN | true | true: use NAIA height. false: preserve input height. |
| use_naia_settings | BOOLEAN | true | Legacy hidden workflow-schema compatibility value. EasyUse Anima Settings globally controls whether desktop Prompt Engineering overrides are sent. |
| pre_prompt | STRING | Legacy hidden workflow-schema compatibility value; configure the global EasyUse Anima NAIA settings. | |
| post_prompt | STRING | Legacy hidden workflow-schema compatibility value; configure the global EasyUse Anima NAIA settings. | |
| auto_hide | STRING | Legacy hidden workflow-schema compatibility value; configure the global EasyUse Anima NAIA settings. | |
| remove_author | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_work_title | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_character_name | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_character_features | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_clothes | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_color | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_location_and_background_color | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_expression | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_pose_action | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_meta_tags | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_object_tags | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| remove_noise_tags | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| e621_auto_boost | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| danbooru_auto_weight | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| tag_implication_compression | COMBO | skip | Legacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings. |
| host | STRING | 127.0.0.1 | Legacy hidden workflow-schema compatibility value; the global EasyUse Anima NAIA host is used. |
| port | INT | 72431–65535 | Legacy hidden workflow-schema compatibility value; the global EasyUse Anima NAIA port is used. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | Prompt text from NAIA or the original input when bypassed or not overridden. |
| negative_prompt | STRING | Negative prompt text from NAIA or the original input when bypassed or not overridden. |
| width | INT | Width from NAIA or the original input when bypassed or not overridden. |
| height | INT | Height from NAIA or the original input when bypassed or not overridden. |