GNM Random Params
GNMRandomParams is the pack's dice roll
- gnm_model
- identity
- expression
Some days you don't care which face you get - you care that it's a plausible face, and that you can get a thousand of them cheaply. That's GNMRandomParams. It samples identity and expression parameter vectors from a standard normal distribution, so every seed hands you a different believable head, no demographic input required.
Wire a GNM_MODEL from GNMModelLoader into it and you get two outputs - identity (GNM_IDENTITY) and expression (GNM_EXPRESSION) - both ready to plug into GNMHeadRender's optional inputs. Three widgets actually matter:
identity_strength(default 1, 0–4) - how far the face deviates from the average head. 1 is "typical person"; push toward 4 and faces get progressively more unusual.expression_strength(default 0, 0–4) - note the default. Leave it and every random face comes out neutral. Raise it if you want random faces that also carry random emotion.seed- the usual: same seed, same face, forever.
Mechanically it's about as simple as it looks: a numpy RNG seeded from your seed draws normal(size=dim) for each of the two vectors and scales by the strengths. No TensorFlow, no neural network on this node - it's pure parameter sampling, which is exactly why it's fast enough to slam through hundreds of seeds in a batch.
Where it shines: seed exploration (build the head, decide whether the face suits your character before investing in the rest of the graph), character-sheet batches when demographics don't matter, and placeholder heads while you tune camera and lighting. Where it doesn't shine: if you need "a Korean woman in her 30s," this is the wrong tool - that's GNMIdentitySampler's job. GNMRandomParams is the dice; the semantic samplers are the instruction.
Install
ComfyUI Manager is the easy path: Custom Nodes → search "ComfyUI-GNM" → Install, then restart. Or clone by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/soylab-edu/ComfyUI-GNM
cd ComfyUI-GNM
pip install -r requirements.txt
The model data is bundled in vendor/ (a 51MB npz) - no separate download. No TensorFlow needed.
Common issues
The main gotcha is that expression_strength defaults to 0. People assume "random" means "random expression too," wire this straight into a render, and get uniformly neutral faces. Raise the strength. Also remember that sampled vectors are only valid for the model they came from - regenerate them if you ever swap the model in the loader.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| gnm_model | GNM_MODEL | — | |
| identity_strength | FLOAT | 1.000–4 | — |
| expression_strength | FLOAT | 0.000–4 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| identity | GNM_IDENTITY | — |
| expression | GNM_EXPRESSION | — |