h4 - Build Face Model:
H4_BuildFaceModel creates one face model by detecting faces in your photos and combining their numerical identity representations, called embeddings. This lets you build a single representation from several views rather than relying on one photo. You can choose an averaging method, a method that reduces the influence of unusual results, or a method that selects the detected face closest to the group average. The node combines every face it detects, so photos containing different people will mix their representations; for a model of one person, use photos that show only that person.
h4 - Build Face Model Input Parameters:
compute_method
Required. Controls how the detected face embeddings are combined. Options are Mean (default), Median, and Mode; there is no numeric minimum or maximum. Mean averages each part of every embedding and is a sensible starting point. Median takes the middle value of each part, reducing the influence of unusually different detected faces. Mode does not calculate a statistical mode: it selects the existing embedding closest to the average of all detected embeddings. The result is normalized to unit length after the method is applied.
images
Optional IMAGE input for a batch of photos. Each image is scanned, and all faces detected in it contribute to the model; a photo with multiple people therefore adds multiple embeddings. No default batch or minimum and maximum image count is specified. Leave this input disconnected if you want to use only a folder, or connect a batch of photos of the same person to build from several views. If you also provide a valid folder, the node scans both sources.
folder_path
Optional single-line STRING containing a path to a folder of photos; its default is an empty string. There is no specified minimum or maximum path length. The node scans files directly inside an existing folder with the extensions .jpg, .jpeg, .png, .bmp, .webp, or .tiff; it does not scan subfolders. Every detected face in those files contributes to the model. An empty or non-existent folder path is skipped, so ensure the path is accessible from the machine running the node.
det_size
Optional face-detection scan size. Options are 640x640 (default) and 320x320; there is no other supported size. 640x640 can help find smaller faces, while 320x320 uses a smaller detection scan. If the face-analysis helper finds no faces at 640x640, it retries at 320x320. This setting affects detection, not the dimensions of your source photos.
h4 - Build Face Model Output Parameters:
FACE_MODEL
The single FACE_MODEL output is a blended InsightFace face object for use by compatible downstream nodes. Its embedding represents the combined detected faces according to your chosen method. Other face information, including the bounding box and keypoints, comes from the first detected face; available pose, age, gender, and landmark attributes are also copied from that face rather than combined. If no faces are found in either source, the output value is None instead of a usable face model.
h4 - Build Face Model Usage Tips:
- For a model of one person, choose photos that clearly show that person and avoid group photos: the node includes every detected face, not just the most prominent one.
- Start with
Meanfor several views of the same person. TryMedianif a few detections appear unrepresentative, orModewhen you prefer one detected embedding closest to the group average. - Choose
640x640when faces are small or difficult to detect. Try320x320when working with clearly visible faces and a smaller detection scan is sufficient. - You can connect an image batch, provide a folder, or use both. If you use a folder, place supported image files directly in it and check that its path is accessible to the node.
h4 - Build Face Model Common Errors and Solutions:
No faces found from any source (Batch or Folder)!
- Explanation: Neither the connected batch nor an eligible folder image produced a detected face. The node returns
NoneforFACE_MODEL. - Solution: Connect a batch or provide an existing folder containing supported images with clearly visible faces. Try
640x640for smaller faces, and confirm your folder path points to the folder itself rather than a photo or a parent folder whose photos are only in subfolders.
Face analysis error: ...
- Explanation: Face detection raised an error while scanning an image. The analysis helper treats that attempt as finding no faces and may retry at a smaller scan size.
- Solution: Try another readable image with a clear face. If the message persists across images, check that your face-analysis setup and its required models are available.
Error reading <filename>: ...
- Explanation: A file in the folder could not be opened or processed. The node logs a warning and continues with the other files.
- Solution: Open the named file outside the node to check that it is a valid image, then repair, replace, or remove it. Also check that the process running the node can read the file.
A valid-looking folder_path produces no folder scan
- Explanation: The node scans a folder only when the path exists and is a directory. A missing path is skipped without a dedicated error message.
- Solution: Check the full path, spelling, and access permissions on the machine running the node. Put supported images directly inside that folder; subfolders are not scanned.
The model includes the wrong person
- Explanation: This is not an error message. The node combines all detected faces, including bystanders in group photos and faces found in both supplied sources.
- Solution: Use photos containing only the intended person, and disconnect or clean up any additional source you do not want included.
