Draw ViT Pose:
DrawViTPose turns a sequence of pose data into visual pose frames. It draws the represented body, hand, and head keypoints on a black canvas, then prepares each frame at a consistent image size. This gives you a visual representation of movement or positioning across a sequence, with control over how prominently the pose lines appear. When suitable retargeting information is available, it can also adjust the framing of the drawn poses.
Draw ViT Pose Input Parameters:
pose_data
The POSEDATA to draw. It must contain pose_metas, a sequence of pose information that the node processes one frame at a time. It may also contain retarget_image, which enables the retarget-aware resizing path when retarget_padding is greater than zero. Connect pose data produced by a compatible upstream node; an ordinary image is not a substitute. No default, minimum, or maximum is specified for this input.
width
The target width of each pose image, in pixels. The node creates a canvas at this width and prepares the resulting frames at the requested size. A larger width gives the pose more horizontal room but produces larger images. Default: 832; minimum: 64; maximum: 2048; step: 1.
height
The target height of each pose image, in pixels. The node creates a canvas at this height and prepares the resulting frames at the requested size. A larger height gives the pose more vertical room but produces larger images. Default: 480; minimum: 64; maximum: 2048; step: 1.
retarget_padding
Controls whether the node uses its retarget-aware resizing path and supplies extra padding to that path. When this value is greater than 0 and pose_data contains a non-null retarget_image, the node uses resize_to_bounds with this padding value; otherwise, it uses its standard padding_resize path. Increasing the value requests more extra padding in the retarget-aware path. Setting it to 0 disables that path, even when a retarget image is present. Default in the node interface: 16; minimum: 0; maximum: 512; step: 1.
body_stick_width
Controls the line width passed to the pose-drawing function for body sticks. Use a larger positive value for more prominent body lines. -1 requests automatic width selection, and 0 is described by the node interface as disabling body drawing. Default: -1; minimum: -1; maximum: 20; step: 1.
hand_stick_width
Controls the line width passed to the pose-drawing function for hand sticks. -1 requests automatic width selection, while 0 explicitly turns off hand drawing. A larger positive value requests more prominent hand lines when hands are drawn. Default: -1; minimum: -1; maximum: 20; step: 1.
draw_head
Determines whether head keypoints are requested during pose drawing. Choose True to include them or False to omit them. This affects the drawn pose rather than the number or dimensions of frames. Options: True or False; default: True.
Draw ViT Pose Output Parameters:
pose_images
An IMAGE batch containing one drawn pose frame for each entry in pose_data["pose_metas"], in the same order. Each frame is prepared at the requested width and height. Internally, the node combines the frames into a tensor and scales pixel values from 0–255 to 0–1 for the image output. Use this output when a later workflow step needs visual pose frames rather than the original pose metadata.
Draw ViT Pose Usage Tips:
- Start with
body_stick_widthandhand_stick_widthat-1to use automatic line widths. Adjust them only when the resulting lines are too thin or too prominent for your intended image size. - Set
hand_stick_widthto0when hands are not relevant to the pose you need to show. Setdraw_headtoFalsewhen head keypoints would add unwanted detail. - Match
widthandheightto the dimensions needed by the next step in your workflow. Check a sample frame before processing a long sequence to make sure the pose remains clearly visible. - Use a positive
retarget_paddingonly when your pose data includes aretarget_imageand you want the retarget-aware resizing path. Set it to0when you want the standard resizing path regardless of whether that image is present.
Draw ViT Pose Common Errors and Solutions:
KeyError: 'pose_metas'
- Explanation: The connected
pose_datadoes not contain thepose_metasentry that DrawViTPose reads to obtain its frames. - Solution: Connect compatible
POSEDATAthat includes pose metadata. Check the upstream node that creates or modifies the pose data.
TypeError: 'NoneType' object is not subscriptable
- Explanation: This can occur when
pose_dataisNoneinstead of a pose-data object, so the node cannot readpose_metas. - Solution: Check that the
pose_datainput is connected and that the upstream node successfully produced pose data.
TypeError: object of type 'NoneType' has no len()
- Explanation: This can occur when
pose_metasexists but isNone. The node needs a sequence so it can count and process its frames. - Solution: Check the upstream pose-data output and ensure it contains a valid sequence of pose metadata.
ValueError: need at least one array to stack
- Explanation: The node reaches the image-batching step without any drawn frames, typically because
pose_metasis empty. - Solution: Ensure the upstream process detected or supplied at least one pose frame before running DrawViTPose.
No hand lines appear
- Explanation: This is the expected result when
hand_stick_widthis0. Hand drawing also depends on the pose information available for each frame. - Solution: Set
hand_stick_widthto-1or a positive value. If hands still do not appear, check whether the upstream pose data includes hand information.
Retarget padding appears to have no effect
- Explanation: The retarget-aware resizing path runs only when
retarget_paddingis greater than0andpose_datacontains a non-nullretarget_image. Otherwise, the node uses standard resizing. - Solution: Check both conditions. If you do not have a retarget image, use the standard resizing result and adjust the target dimensions as needed.
