GNM Identity Sampler:
GNMIdentitySampler creates a sampled identity for Google's GNM parametric 3D head model using its semantic identity sampler. It draws a variation associated with a selected gender and ethnicity category, then lets you control how strongly that variation affects the identity vector. This gives you a way to explore different head shapes while keeping a chosen sample repeatable. The node produces model parameters, not a rendered image; a compatible GNM rendering node can turn them into a visible head.
GNM Identity Sampler Input Parameters:
gender
Selects the gender category used by the semantic sampler. The available options are female and male. This choice affects which category the identity variation is sampled from; it does not specify an exact appearance. No default option is stated in the supplied node interface.
ethnicity
Selects the ethnicity category used by the semantic sampler. The available options are middle_eastern, asian, white, and black. The sampler uses this category together with the gender selection to produce an identity variation. These are model category labels, not guarantees about how any rendered face will look. No default option is stated in the supplied node interface.
strength
Controls the magnitude of the sampled identity variation. The sampler multiplies the generated vector by this value: 0.0 produces a zero identity vector, while higher values increase the variation from that zero vector. The default is 1.0; the minimum is 0.0, the maximum is 3.0, and the interface step is 0.05. A high value changes the size of the variation, but does not guarantee a particular visual result.
seed
Sets the random seed used to generate the sample. Keep the same seed, gender, ethnicity, and strength to reproduce the same identity vector; change the seed to explore another variation within the selected categories. The default is 0; the minimum is 0 and the maximum is 18446744073709551615.
GNM Identity Sampler Output Parameters:
identity
A GNM_IDENTITY vector containing the sampled head-identity parameters after strength has been applied. It is not an image or a text description. Connect it to the optional identity input of a compatible node such as GNMHeadRender to see the resulting head. The vector represents one sampled variation, so its values should be interpreted as model parameters rather than as individual, named facial features.
GNM Identity Sampler Usage Tips:
- Start with
strengthat its default of1.0. Hold the categories and seed fixed while adjusting strength to compare the same sampled variation at different magnitudes. - Change only
seedwhen you want another identity within the same selected categories. Record the seed and settings for a result you want to reproduce. - Set
strengthto0.0when you need a zero-vector identity for comparison. At this setting, changing the seed or categories will not change the output vector. - Connect
identityto GNMHeadRender and keep its expression and camera settings consistent when comparing identities. This makes differences in the rendered heads easier to assess.
GNM Identity Sampler Common Errors and Solutions:
ValueError: '<value>' is not in list
- Explanation: The sampler looks up
genderandethnicityin its supported option lists. This error can occur if a workflow passes a value that is not an exact match. - Solution: Select one of the options shown in the node interface. Check spelling and underscores in values such as
middle_eastern.
ValueError: expected non-negative integer
- Explanation: The random-number generator requires a valid seed. This error can occur if a negative seed is supplied outside the interface's allowed range.
- Solution: Set
seedto an integer from0through18446744073709551615, preferably using the node's seed control.
identity has <number> dims, expected <number>
- Explanation: This message comes from GNMHeadRender, not GNMIdentitySampler. It means the renderer received an identity vector whose length does not match its loaded GNM model.
- Solution: Connect this node's
identityoutput directly to a compatible GNM renderer and avoid substituting or altering the vector with incompatible nodes.
No visible difference after changing the seed or categories
- Explanation: If
strengthis0.0, every sampled vector is multiplied by zero. A disconnectedidentityoutput also cannot affect a downstream render. - Solution: Set
strengthabove0.0, confirm thatidentityis connected to the renderer, and render again.
