Nodes/comfyui_LLM_Polymath/Polymath Settings
ComfyUI Node

Polymath Settings

One node to set every dial, then forget it

By lum3on·Created 2 years ago·Updated 6 months ago· 75
Polymath Settings
    • LLM_SETTINGS
    temperature0.80
    top_p0.95
    top_k40
    max_output_tokens1024
    response_format_jsonfalse
    ollama_keep_alive5
    request_timeout120
    dalle_qualitystandard
    dalle_stylevivid
    dalle_size1024x1024
    batch_size1
    gpt_image_qualityauto
    gpt_image_backgroundopaque
    gpt_image_sizeauto
    gemini_aspect_ratio1:1
    gemini_image_size1K

    Polymath Settings is the config pipe for the polymath pack: a single node with every sampling and generation knob the pack supports, and exactly one output - an LLM_SETTINGS bundle that you wire into the llm_settings input on the polymath_chat node. On its own it does nothing. In front of a chat node, it's the difference between fiddling with a model mid-workflow and setting your defaults once and reusing them everywhere.

    It exists because the chat node's prompt box would be a disaster if every sampling parameter lived there too. This is the "advanced parameter node" the pack's README lists as a planned feature and then shipped - the settings are read as a plain dict by polymath_chat and handed straight to whichever API you're calling.

    The inputs that matter

    The LLM half is the part you'll actually touch:

    • temperature (0.0–2.0, default 0.8) and top_p (0.0–1.0, default 0.95) - randomness and nucleus sampling. For stable, repeatable prompt work, drop temperature to 0.3–0.5; for creative prompting leave it alone.
    • top_k (default 40) - restrict sampling to the top-k most likely tokens. Mostly an Ollama thing; the OpenAI-family APIs barely honor it.
    • max_output_tokens (default 1024) - how long an answer can be. -1 means unlimited, and 65536 is the ceiling.
    • response_format_json - force structured JSON output. Great for the "JSON Converter" agent, useless if you're just asking for a prompt.
    • ollama_keep_alive (1–10, default 5) and request_timeout (0–600s, default 120) - the first keeps your local Ollama model warm between calls instead of unloading it from VRAM, the second stops a hung cloud API from stalling your whole queue.

    Then there's the image-generation half, which only matters for the gpt-image-1 / Gemini image models: dalle_quality/dalle_style/dalle_size and batch_size (1–4) for the DALL·E-style path, gpt_image_quality/gpt_image_background/gpt_image_size (including auto) for GPT Image, and gemini_aspect_ratio (ten presets from 1:1 to 21:9) plus gemini_image_size (1K/2K/4K) for Gemini. If you're only using a text model, ignore the entire bottom half of the node - it's dead weight in that config, but harmless.

    How to use it

    Drop it in the graph, set your values, and connect LLM_SETTINGSllm_settings on a polymath_chat node. That's the whole wiring. The one thing to watch: these settings are read when the graph runs, not when you drag the node - so if you're looping a workflow and want to sweep temperature across runs, you can drive this node's inputs from another node's output instead of hard-coding. It's a pipe; treat it like one.

    Installation

    No extra steps beyond the pack itself - Polymath Settings is part of comfyui_LLM_Polymath, so install the pack via ComfyUI Manager (search "comfyui_LLM_Polymath") or clone it into ComfyUI/custom_nodes and pip install -r requirements.txt, then restart. One README note that bites people: the "Nano Banana Pro" (Gemini 3) models and the resolution pickers need a newer google-genai than the pack pins, so run pip install --upgrade google-genai if those don't show up or error out.

    It's not a glamorous node - it's a settings block. But once your chat setup has five different models doing five different jobs, you'll be glad each one's config lives in a named node you can copy into any workflow instead of buried in per-node defaults.

    CategoryPolymath/Settings

    Inputs (16)

    NameTypeDefaultDescription
    temperatureFLOAT0.800–2
    top_pFLOAT0.950–1
    top_kINT400–100
    max_output_tokensINT1024-1–65536
    response_format_jsonBOOLEANfalse
    ollama_keep_aliveINT51–10
    request_timeoutINT1200–600
    dalle_qualityCOMBOstandard2 options: standard, hd
    dalle_styleCOMBOvivid2 options: vivid, natural
    dalle_sizeCOMBO1024x10243 options: 1024x1024, 1792x1024, 1024x1792
    batch_sizeINT11–4
    gpt_image_qualityCOMBOauto4 options: low, medium, high, auto
    gpt_image_backgroundCOMBOopaque3 options: transparent, opaque, auto
    gpt_image_sizeCOMBOauto4 options: 1024x1024, 1536x1024, 1024x1536, auto
    gemini_aspect_ratioCOMBO1:110 options: 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, +4
    gemini_image_sizeCOMBO1K3 options: 1K, 2K, 4K

    Outputs (1)

    NameTypeDescription
    LLM_SETTINGSLLM_SETTINGS