Nodes/ComfyUI Globetrotter Nodes/✨ Ollama Prompter
ComfyUI Node

✨ Ollama Prompter

The name is half a lie β€” it's a full prompt builder even with Ollama off

By manifestationsΒ·Created about a year agoΒ·Updated about a year agoΒ· 4
✨ Ollama Prompter
    • enhanced_prompt
    β—„keywordsa cat, sitting on a chair, fantasy artβ–Ί
    β—„custom_promptβ–Ί
    β—„model_namedisabledβ–Ί
    β—„prompt_stylerandomβ–Ί
    β—„art_stylerandomβ–Ί
    β—„camerarandomβ–Ί
    β—„filmrandomβ–Ί
    β—„lightingrandomβ–Ί
    β—„photographerrandomβ–Ί
    β—„shot_typerandomβ–Ί
    β—„moodnoneβ–Ί
    β—„time_of_daynoneβ–Ί
    β—„weathernoneβ–Ί
    β—„texturenoneβ–Ί
    β—„color_schemenoneβ–Ί
    β—„art_movementnoneβ–Ί
    β—„photo_stylenoneβ–Ί
    β—„render_stylenoneβ–Ί
    β—„artistic_techniquenoneβ–Ί
    β—„perspectivenoneβ–Ί
    β—„emotionnoneβ–Ί
    β—„seed0β–Ί
    β—„detail_scalenoneβ–Ί
    β—„creative_modestandardβ–Ί
    β—„ollama_urlhttp://127.0.0.1:11434/api/generateβ–Ί

    The "✨ Ollama Prompter" display name sells this node short, and slightly wrong. It can hand your keywords to a local Ollama model for rewriting - but with model_name on its default of "disabled" it's a completely self-contained prompt builder: nineteen dropdowns of art styles, real camera bodies, films, lighting rigs, and shot types that assemble an enhanced prompt without touching a single API. No Ollama, no key, no network. Start there; add Ollama later if you want the rewrite pass.

    What it is

    A prompt-enhancement node from ComfyUI Globetrotter Nodes (manifestations/comfyui-globetrotter). You give it keywords - the default is "a cat, sitting on a chair, fantasy art" - plus a stack of creative controls, and it returns a single enhanced_prompt STRING. In builder mode it's a much richer cousin of the pack's country nodes. With Ollama it becomes an LLM rewriter that takes your draft and expands it.

    How it works

    At load time the node reads style lists from data/styles/ (cameras, films, lighting, photographers, shot types, art styles) and prompt instructions from data/prompts/ - the cinematic, artistic-masterpiece, surreal-dreams, sdxl, and flux options come from those JSON files. It also pings Ollama's /api/tags endpoint and populates model_name with whatever models you have pulled.

    When you run it, every dropdown set to "random" gets a value picked; then it assembles the prompt from your keywords, appending the chosen styles (camera: Nikon D850 with Nikkor 50mm f/1.8, film: Kodak Portra 400, etc.). If model_name is "disabled," that assembled prompt is returned as-is. If a model is selected, the prompt is sent to ollama_url (default http://127.0.0.1:11434/api/generate) with stream: false, your seed in the options, and a system prompt built from creative_mode, detail_scale, and the chosen prompt_style instructions. The code even strips <think>…</think> blocks out of the reply - a DeepSeek workaround that tells you exactly what people were running through this thing.

    The inputs that matter

    • keywords - the seed text. Everything else decorates it.
    • model_name - "disabled" or a model you've pulled. This is the on/off switch for the LLM pass.
    • prompt_style - random, disabled, or one of the five styles. Note random means a different style each run unless you pin it.
    • camera, film, photographer, shot_type - the fun ones. Naming a real camera is genuinely high-leverage for photorealistic output, which is why this list is 49 bodies deep.
    • creative_mode (standard/artistic/photographic/surreal/minimalist) and detail_scale tune how aggressively the LLM (or the builder) embellishes.
    • seed - passed through to Ollama's options; pins the LLM's randomness.
    • ollama_url - optional input, defaults to the local API. Change it if your Ollama runs elsewhere.

    Install

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/manifestations/comfyui-globetrotter
    

    Restart ComfyUI, or search "Globetrotter" in ComfyUI Manager. One gotcha: the node uses requests, which is not in the pack's requirements.txt (that lists jinja2, flake8, transformers). ComfyUI bundles requests, so it usually just works - but if you run a stripped virtual environment, pip install requests.

    For the LLM pass you need Ollama running:

    # outside ComfyUI - from ollama.com or your package manager
    ollama pull llama3.2        # or whatever model you like
    ollama serve                # keeps 127.0.0.1:11434 alive
    

    Then restart ComfyUI so the node sees the new model in its dropdown.

    Troubleshooting

    • model_name only shows "disabled": Ollama isn't running or has no models pulled. Start it, ollama pull something, restart ComfyUI - the list is fetched when the node loads.
    • The output literally starts with "ERROR: OLLAMA NOT REACHABLE": the node catches the failed request and returns that text as the prompt string. It won't stop your workflow - it'll happily encode the error into your conditioning. Check the output before wiring it downstream.
    • Random results every run: prompt_style and the style dropdowns default to "random." Pin the ones you care about; seed only matters once a model is doing the rewriting.
    • Timeouts: the request has a 60s cap. A big model on CPU can blow past that - try a smaller quantized model.
    Category🌐 Globetrotter/LLM

    Inputs (25)

    NameTypeDefaultDescription
    keywordsSTRINGa cat, sitting on a chair, fantasy artβ€”
    custom_promptSTRINGβ€”
    model_nameCOMBOdisabled1 options: disabled
    prompt_styleCOMBOrandom7 options: random, disabled, cinematic, artistic-masterpiece, surreal-dreams, sdxl, +1
    art_styleCOMBOrandom35 options: none, random, Anime, Cinematic, Oil Painting, Casual, +29
    cameraCOMBOrandom49 options: none, random, Nikon D850 with Nikkor 50mm f/1.8, Canon EOS 5D Mark IV with Canon EF 24-70mm f/2.8L II, Sony A7R IV with Sony FE 85mm f/1.4 GM, FujiFilm X-T4 with Fujinon XF 35mm f/2 R WR, +43
    filmCOMBOrandom86 options: none, random, Kodak Portra 400, Fujifilm Pro 400H, Ilford HP5 Plus 400, Kodak Tri-X 400, +80
    lightingCOMBOrandom27 options: none, random, natural light, studio lighting, softbox lighting, ring light, +21
    photographerCOMBOrandom38 options: none, random, Steven Meisel, Annie Leibovitz, Mert & Marcus, Inez & Vinoodh, +32
    shot_typeCOMBOrandom24 options: none, random, close-up, extreme close-up, medium close-up, medium shot, +18
    moodCOMBOnone20 options: none, random, dreamy, ethereal, mystical, dramatic, +14
    time_of_dayCOMBOnone14 options: none, random, dawn, sunrise, morning, midday, +8
    weatherCOMBOnone14 options: none, random, sunny, partly cloudy, overcast, misty, +8
    textureCOMBOnone14 options: none, random, smooth, rough, silky, velvet, +8
    color_schemeCOMBOnone14 options: none, random, monochromatic, complementary, analogous, triadic, +8
    art_movementCOMBOnone17 options: none, random, impressionism, expressionism, surrealism, cubism, +11
    photo_styleCOMBOnone14 options: none, random, street photography, portrait photography, landscape photography, macro photography, +8
    render_styleCOMBOnone17 options: none, random, photorealistic, stylized, cartoon, anime, +11
    artistic_techniqueCOMBOnone14 options: none, random, chiaroscuro, sfumato, impasto, pointillism, +8
    perspectiveCOMBOnone11 options: none, random, bird's eye view, worm's eye view, dutch angle, over the shoulder, +5
    emotionCOMBOnone14 options: none, random, contemplative, joyful, melancholic, determined, +8
    seedINT00–18446744073709550000β€”
    detail_scaleCOMBOnone7 options: none, exact, detailed, extra details, exaggerated, masterpiece, +1
    creative_modeCOMBOstandard5 options: standard, artistic, photographic, surreal, minimalist
    ollama_urloptSTRINGhttp://127.0.0.1:11434/api/generateβ€”

    Outputs (1)

    NameTypeDescription
    enhanced_promptSTRINGβ€”