Nodes/ComfyUI-Apt_Preset/AI_Ollama_text
ComfyUI Node

AI_Ollama_text

Text chat against your local Ollama models

By cardenluo·Created 2 years ago·Updated 21 days ago· 309
AI_Ollama_text
    • analysis_result
    • system_prompt
    model_nameqwen3.5:latest
    presetNone
    custom_system_prompt
    prompt
    temperature0.7
    max_tokens512
    seed0
    custom_model

    The text-only sibling of AI_Ollama_image - same local-first setup, same no-API-key, no-account approach, minus the vision inputs. If your workflow needs prompt rewriting, expansion, summarization, or any general LLM text task and you'd rather run it on your own hardware than send it to a cloud API, this is the node for it. Everything runs through Ollama, so quality and speed depend entirely on which model you've pulled and how much RAM/VRAM your machine has to spare.

    Required fields: model_name, a dropdown offering qwen3.5:latest, qwen3-coder:30b, gemma3:1b-it-fp16, and gemma3:12b as suggestions (note the coder-specific model in there - worth reaching for if your text task is actually code generation rather than prose); preset (defaults to "None" until populated via AI_PresetSave); custom_system_prompt; and prompt, your actual input text. As with its vision sibling, the more practically useful field once you know your local setup is custom_model in the optional section - a free-text field to point at any model tag you've actually pulled, rather than being limited to the four presets. Also optional: temperature (0–1, default 0.7), max_tokens (1–4096, default 512 - noticeably lower than the vision node's 2048 default, worth raising if you need longer completions), and seed. Outputs: analysis_result (the response text) and system_prompt.

    The gemma3:1b-it-fp16 option in that dropdown is worth calling out on its own: it's a genuinely tiny model, the kind that'll run acceptably fast even on a laptop with no dedicated GPU. If you just need quick prompt cleanup or a short rewrite inside a batch pipeline and don't want a heavier model eating VRAM you need for the actual image/video generation happening elsewhere in the same graph, that's exactly the situation it's meant for - trade a bit of quality for speed and a near-zero memory footprint.

    Installing it: standard for the pack - ComfyUI Manager, search "ComfyUI-Apt_Preset," or cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset then install.bat and restart. Ollama itself is a separate install from ollama.com (or your package manager), and you need to pull whatever model you plan to use first - ollama pull qwen3-coder:30b, for example - since this node talks to models Ollama already has, it doesn't fetch them for you.

    Troubleshooting: if every request fails outright, the local Ollama service is probably not running - chain Ai_Ollama_RunModel in front of this node so you get a clear status message instead of a silent timeout. If a specific model_name errors, run ollama list in a terminal to confirm you actually have that exact tag pulled locally; the dropdown is a suggestion list, not a live check against what's installed. And if responses feel cut off, the default max_tokens of 512 is genuinely tight for anything beyond a short answer - bump it up before assuming the model itself is the problem.

    CategoryApt_Preset/AI_tool

    Inputs (8)

    NameTypeDefaultDescription
    model_nameCOMBOqwen3.5:latest5 options: None, qwen3.5:latest, qwen3-coder:30b, gemma3:1b-it-fp16, gemma3:12b
    presetCOMBONone1 options: None
    custom_system_promptSTRING
    promptSTRING
    temperatureoptFLOAT0.70–1
    max_tokensoptINT5121–4096
    seedoptINT00–999999999
    custom_modeloptSTRING

    Outputs (2)

    NameTypeDescription
    analysis_resultSTRING
    system_promptSTRING