ComfyUI Node
Context Sizer (GGUF)
A ComfyUI node in Kinburg-Nodes/LLM with 5 inputs and 5 outputs.
Context Sizer (GGUF)
- config
- image
- text_tokens
- image_tokens
- total_tokens
- suggested_n_ctx
- info
◄text_1—►
◄margin64►
◄unload_after_runconfig default►
CategoryKinburg-Nodes/LLM
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| config | KINBURG_LLM_CONFIG | A 'Local LLM Settings (GGUF)' node — its model (and mmproj, for image sizing) and max_tokens are used. | |
| text_1opt | STRING | Prompt text to size (e.g. your rubric / prompt). Connect-only; more text_* slots appear as you wire them and are joined with newlines. The config's system prompt is counted automatically. | |
| imageopt | IMAGE | Optional image(s) to size for — needs an mmproj on the config (Vision Settings). A batch is fine; the node reports the largest image's token cost. | |
| marginopt | INT | 640–8192 | Safety headroom added on top of input + output when suggesting n_ctx. |
| unload_after_runopt | COMBO | config default | Free the model from VRAM after THIS node runs, without touching the shared config. 'config default' follows the Settings node; 'unload after run' frees VRAM (a different model runs next); 'keep loaded' stays warm (the same model works next). |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| text_tokens | INT | — |
| image_tokens | INT | — |
| total_tokens | INT | — |
| suggested_n_ctx | INT | — |
| info | STRING | — |