Polymath Settings
One node to set every dial, then forget it
- LLM_SETTINGS
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.
-1means 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_SETTINGS → llm_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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| temperature | FLOAT | 0.800–2 | — |
| top_p | FLOAT | 0.950–1 | — |
| top_k | INT | 400–100 | — |
| max_output_tokens | INT | 1024-1–65536 | — |
| response_format_json | BOOLEAN | false | — |
| ollama_keep_alive | INT | 51–10 | — |
| request_timeout | INT | 1200–600 | — |
| dalle_quality | COMBO | standard | 2 options: standard, hd |
| dalle_style | COMBO | vivid | 2 options: vivid, natural |
| dalle_size | COMBO | 1024x1024 | 3 options: 1024x1024, 1792x1024, 1024x1792 |
| batch_size | INT | 11–4 | — |
| gpt_image_quality | COMBO | auto | 4 options: low, medium, high, auto |
| gpt_image_background | COMBO | opaque | 3 options: transparent, opaque, auto |
| gpt_image_size | COMBO | auto | 4 options: 1024x1024, 1536x1024, 1024x1536, auto |
| gemini_aspect_ratio | COMBO | 1:1 | 10 options: 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, +4 |
| gemini_image_size | COMBO | 1K | 3 options: 1K, 2K, 4K |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LLM_SETTINGS | LLM_SETTINGS | — |