Nodes/comfyui-bulk-prompt/πŸ¦™ Bulk Prompt Ollama Improver
ComfyUI Node

πŸ¦™ Bulk Prompt Ollama Improver

Improve each prompt with a local Ollama model (official ollama library), optionally trimming any chat wrapper the model adds. Use the πŸ”„ Reconnect button to load the model list.

By sifatradsΒ·Created 3 months agoΒ·Updated 3 months agoΒ· 0
πŸ¦™ Bulk Prompt Ollama Improver
    • result
    • context
    • meta
    β—„instructionYou are an expert prompt engineer for image generation. Rewrite the following prompt to be more vivid and detailed. Output ONLY the improved prompt, with no preamble or explanation.β–Ί
    β—„urlhttp://127.0.0.1:11434β–Ί
    β—„modelβ–Ύβ–Ί
    β—„keep_alive_minutes5β–Ί
    β—„timeout120β–Ί
    β—„enabledtrueβ–Ί
    β—„trim_outputtrueβ–Ί
    β—„positiveβ€”β–Ί
    β—„contextβ€”β–Ί
    CategoryBulkPrompt

    Inputs (9)

    NameTypeDefaultDescription
    instructionSTRINGYou are an expert prompt engineer for image generation. Rewrite the following prompt to be more vivid and detailed. Output ONLY the improved prompt, with no preamble or explanation.System prompt β€” tell the model what to do with the prompt.
    urlSTRINGhttp://127.0.0.1:11434Ollama server URL. Change this for a custom host/port (e.g. http://192.168.1.50:11434), then click πŸ”„ Reconnect.
    modelCOMBOPick a model (auto-loaded from the Ollama server at the default URL). After changing url or pulling new models, click πŸ”„ Reconnect to refresh the list.
    keep_alive_minutesINT5-1–1440Minutes Ollama keeps the model loaded after inference (-1 = keep forever, 0 = unload immediately).
    timeoutINT1205–3600Max seconds to wait for the response. Large models (e.g. 14B) need more β€” the first run also loads the model into VRAM. Use 300+ if you hit timeouts.
    enabledBOOLEANtrueIf off, the prompt passes through unchanged (no Ollama call).
    trim_outputBOOLEANtrueKeep only the prompt: strip any chat wrapper the model adds (preambles, '---'/code-fence/'Prompt:' headers, trailing offers). Turn off to use the raw reply.
    positiveSTRINGβ€”
    contextoptSTRINGOptional Ollama context (comma-separated ints) for multi-turn continuity.

    Outputs (3)

    NameTypeDescription
    resultSTRINGβ€”
    contextSTRINGβ€”
    metaSTRINGβ€”