Nodes/ComfyUI-GNM/GNM Head Viewport (Advanced)
ComfyUI Node

GNM Head Viewport (Advanced)

GNM Head Viewport (Advanced)

By soylab-edu·Created 3 months ago·Updated 2 months ago· 10
GNM Head Viewport (Advanced)
    • image
    • normal_map
    • depth_map
    • mask
    ◄gender▾►
    ◄ethnicity▾►
    ◄identity_seed0►
    ◄identity_strength0.00►
    ◄expression▾►
    ◄expression_seed0►
    ◄expression_strength0.00►
    ◄components{}►
    ◄neck_pitch0.0►
    ◄neck_yaw0.0►
    ◄neck_roll0.0►
    ◄head_pitch0.0►
    ◄head_yaw0.0►
    ◄head_roll0.0►
    ◄gaze_pitch0.0►
    ◄gaze_yaw0.0►
    ◄gaze_vergence0.0►
    ◄translate_x0.000►
    ◄translate_y0.000►
    ◄translate_z0.000►
    ◄camera_azimuth0.0►
    ◄camera_elevation0.0►
    ◄zoom1.00►
    ◄fov25►
    ◄width512►
    ◄height512►
    ◄background0.95►
    ◄surface▾►
    ◄antialias2►

    The basic viewport gambles; this one sculpts. GNMHeadViewportAdvanced takes the all-in-one head and adds the per-component sliders from GNM's official demo - the same curated subset Google's own notebook exposes - so instead of re-rolling seeds until a face happens to work, you build it.

    The component panels cover that demo set: identity gets head ×10 and eyes ×3; expression splits into left eye ×3, right eye ×3, lower face ×7, tongue ×4, and pupil ×1. On top of that it adds the good stuff the basic node lacks - separate neck (±90°) and head (±45°) rotation so you can turn the neck without swinging the head, a full gaze rig (gaze_pitch, gaze_yaw, and gaze_vergence for converging the eyes), and XYZ translate sliders (±0.2m) to frame the head without touching the camera.

    Here's the workflow detail that trips people up: the strengths default to 0, not 1. That's deliberate - you start from the template (average) face and sculpt, exactly like the official demo. If you'd rather fine-tune a seeded face, raise identity_strength/expression_strength and the component sliders become offsets layered on top of the sampled vector rather than the whole story.

    Under the hood, component values live in a hidden components JSON widget, which is what makes them survive a workflow save/load intact - close ComfyUI, come back tomorrow, your sculpt is still there. Each group also has a reset button for that region only, which saves you from starting over when one area goes wrong. The README even hands you a working example: to open the mouth, set lower-face e200 = -2.6, e201 = 1.0, e202 = -2.1.

    Outputs are the standard four - image, normal_map, depth_map, mask - and the live preview behaves exactly like the basic node's: drag to orbit, wheel to zoom, queued render at full width/height. Reach for this one when you want the demo's hands-on sculpting without committing to the full component dump. The Pro node below it is for the truly obsessive.

    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
    

    Model data ships in vendor/; no separate download, no TensorFlow. Renderer deps (pyrender, pyglet<2, pinned PyOpenGL==3.1.10) and PYOPENGL_PLATFORM=egl on headless Linux, same as the rest of the pack.

    Common issues

    The one thing that confuses everyone is the strength defaults of 0 - if the face isn't moving when you drag component sliders, check that you actually changed a slider, and that you're not staring at a component whose offset is being dominated by a large identity_strength. And if the component panel never appears, it's the same restart fix as the basic viewport: the /gnm/viewport/* routes only register at startup.

    CategoryGNM

    Inputs (29)

    NameTypeDefaultDescription
    genderCOMBO2 options: female, male
    ethnicityCOMBO4 options: middle_eastern, asian, white, black
    identity_seedINT00–18446744073709550000—
    identity_strengthFLOAT0.000–3—
    expressionCOMBO20 options: surprise, disgust, suck, compress_face, stretch_face, happy, +14
    expression_seedINT00–18446744073709550000—
    expression_strengthFLOAT0.000–3—
    componentsSTRING{}—
    neck_pitchFLOAT0.0-90–90—
    neck_yawFLOAT0.0-90–90—
    neck_rollFLOAT0.0-90–90—
    head_pitchFLOAT0.0-45–45—
    head_yawFLOAT0.0-45–45—
    head_rollFLOAT0.0-15–15—
    gaze_pitchFLOAT0.0-25–25—
    gaze_yawFLOAT0.0-30–30—
    gaze_vergenceFLOAT0.0-10–10—
    translate_xFLOAT0.000-0.2–0.2—
    translate_yFLOAT0.000-0.2–0.2—
    translate_zFLOAT0.000-0.2–0.2—
    camera_azimuthFLOAT0.0-180–180—
    camera_elevationFLOAT0.0-89–89—
    zoomFLOAT1.000.2–5—
    fovFLOAT255–90—
    widthINT51264–4096—
    heightINT51264–4096—
    backgroundFLOAT0.950–1—
    surfaceCOMBO2 options: plain, edgeflow_texture
    antialiasINT21–4—

    Outputs (4)

    NameTypeDescription
    imageIMAGE—
    normal_mapIMAGE—
    depth_mapIMAGE—
    maskMASK—