Lmcq Input Validator
Lmcq Input Validator — check if a text input is a number or a string
- result
This is the smallest, least glamorous node in the whole pack, and it does exactly one thing: look at a piece of text and tell you, as a plain true/false, whether it's a pure number or not. No AI, no models, no external calls - just a type check you'd normally write in two lines of Python, packaged as a node so you can use it without leaving the graph.
Why you'd want this. ComfyUI workflows increasingly pull inputs from dynamic sources - text fields the user edits, values coming out of another node, strings assembled from templates. Sometimes you need to branch behavior depending on whether that value is numeric (a seed, a count, an index) or a free-form string (a prompt fragment, a filename). Rather than writing custom logic, you drop this node in front of a Switch or gate node and let its BOOLEAN output do the routing.
The two inputs. input_text is whatever string you're checking - wire in anything that produces text, or type a value directly. check_type is a dropdown with exactly two options: is_digit, which returns true only if the text is a pure number, and is_string, which returns true for anything that isn't a pure number (per the README, any input that fails the digit check counts as a string here - there's no separate "is this alphabetic" mode).
The output. result, a single BOOLEAN. That's it - feed it into whatever conditional logic node you're using to branch the rest of your graph.
Where this actually earns its keep. Think of workflows where a value is supposed to be user-editable but has to be numeric downstream - say a batch count or a seed pulled from a text widget rather than a proper INT input. Someone fat-fingers a comma, a stray letter, or leaves it blank, and instead of your KSampler throwing an opaque error mid-run, you can catch it earlier: run the text through this node with check_type set to is_digit, and if it comes back false, route to an error/notify branch instead of letting bad data hit the sampler. It's not fancy, but it's the kind of small guard rail that saves you from a failed run three nodes downstream.
Installing it. Through ComfyUI Manager - search "ComfyUI-LMCQ" and install - or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sebord/ComfyUI-LMCQ
Restart ComfyUI. This node has zero dependencies of its own; it's pure string logic, no downloads, no external calls.
Honest take. Don't expect much from this one - it's a utility, not a feature. If your workflow tooling already has a general-purpose type-check or regex node (several utility packs in the ecosystem cover the same ground with more options, like matching floats or specific patterns), you probably don't need to install all of ComfyUI-LMCQ just for this. But if you're already pulling in the pack for its image saver or the Flux NF4 loader, this one's free - no reason not to use it where it fits.
The one gotcha worth knowing. It's pack-wide, not specific to this node: ComfyUI-LMCQ's encryption-related nodes depend on a compiled runtime module that's occasionally missing after install, and when that import fails it takes down the entire pack's node registration - including this one, despite having nothing to do with encryption. If LmcqInputValidator (or anything else from LMCQ) isn't showing up in your node search at all, check your ComfyUI console for a ModuleNotFoundError referencing runtime.model_protection. It's a known issue reported on r/comfyui, and the README's January 2026 changelog entry walks through the fix: copy the Python-version-matching files into the runtime folder, delete the rest, restart.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input_text | STRING | — | |
| check_type | COMBO | 2 options: is_digit, is_string |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | BOOLEAN | — |