Nodes/ComfyUI EasyUse Anima/Anima NAIA Random Prompt
ComfyUI Node

Anima NAIA Random Prompt

Pull a random prompt from your local NAIA service

By n0va39·Created 3 months ago·Updated 2 days ago· 25
Anima NAIA Random Prompt
    • prompt
    • negative_prompt
    • width
    • height
    use_naia_bridgetrue
    freeze_naia_outputfalse
    show_previewtrue
    cached_prompt
    cached_negative_prompt
    cached_width0
    cached_height0
    cached_signature
    prompt
    override_prompttrue
    negative_prompt
    override_negativetrue
    width1024
    override_widthtrue
    height1024
    override_heighttrue
    use_naia_settingstrue
    pre_prompt
    post_prompt
    auto_hide
    remove_authorskip
    remove_work_titleskip
    remove_character_nameskip
    remove_character_featuresskip
    remove_clothesskip
    remove_colorskip
    remove_location_and_background_colorskip
    remove_expressionskip
    remove_pose_actionskip
    remove_meta_tagsskip
    remove_object_tagsskip
    remove_noise_tagsskip
    e621_auto_boostskip
    danbooru_auto_weightskip
    tag_implication_compressionskip
    host127.0.0.1
    port7243

    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.

    CategoryNAIA Bridge/API

    Inputs (37)

    NameTypeDefaultDescription
    use_naia_bridgeBOOLEANtruefalse: bypass NAIA and return prompt/negative_prompt/width/height as-is. This mode keeps ComfyUI cache stable when inputs are unchanged.
    freeze_naia_outputBOOLEANfalsetrue: if cached output is valid, return it without calling NAIA. Saved-image workflows are written with this enabled.
    show_previewBOOLEANtrueShow the large read-only preview widget in the node UI.
    cached_promptSTRINGStored prompt used for frozen output and saved-image reproduction.
    cached_negative_promptSTRINGStored negative prompt used for frozen output and saved-image reproduction.
    cached_widthINT00–8192Stored width used for frozen output and saved-image reproduction.
    cached_heightINT00–8192Stored height used for frozen output and saved-image reproduction.
    cached_signatureSTRINGInternal signature for validating cached output.
    promptSTRINGReturned as-is when bypassed or when override_prompt is false.
    override_promptBOOLEANtruetrue: use NAIA prompt. false: preserve input prompt.
    negative_promptSTRINGReturned as-is when bypassed or when override_negative is false.
    override_negativeBOOLEANtruetrue: use NAIA negative prompt. false: preserve input negative_prompt.
    widthINT102464–8192Returned as-is when bypassed or when override_width is false.
    override_widthBOOLEANtruetrue: use NAIA width. false: preserve input width.
    heightINT102464–8192Returned as-is when bypassed or when override_height is false.
    override_heightBOOLEANtruetrue: use NAIA height. false: preserve input height.
    use_naia_settingsBOOLEANtrueLegacy hidden workflow-schema compatibility value. EasyUse Anima Settings globally controls whether desktop Prompt Engineering overrides are sent.
    pre_promptSTRINGLegacy hidden workflow-schema compatibility value; configure the global EasyUse Anima NAIA settings.
    post_promptSTRINGLegacy hidden workflow-schema compatibility value; configure the global EasyUse Anima NAIA settings.
    auto_hideSTRINGLegacy hidden workflow-schema compatibility value; configure the global EasyUse Anima NAIA settings.
    remove_authorCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_work_titleCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_character_nameCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_character_featuresCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_clothesCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_colorCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_location_and_background_colorCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_expressionCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_pose_actionCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_meta_tagsCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_object_tagsCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    remove_noise_tagsCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    e621_auto_boostCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    danbooru_auto_weightCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    tag_implication_compressionCOMBOskipLegacy hidden workflow-schema compatibility value. Configure preprocessing in the global EasyUse Anima NAIA settings.
    hostSTRING127.0.0.1Legacy hidden workflow-schema compatibility value; the global EasyUse Anima NAIA host is used.
    portINT72431–65535Legacy hidden workflow-schema compatibility value; the global EasyUse Anima NAIA port is used.

    Outputs (4)

    NameTypeDescription
    promptSTRINGPrompt text from NAIA or the original input when bypassed or not overridden.
    negative_promptSTRINGNegative prompt text from NAIA or the original input when bypassed or not overridden.
    widthINTWidth from NAIA or the original input when bypassed or not overridden.
    heightINTHeight from NAIA or the original input when bypassed or not overridden.