ComfyUI Node: ID Photos

Class Name

IDPhotos

Category
🎤MW/MW-PortraitTools
Author
mw (Account age: 2475days)
Extension
MW-ComfyUI_PortraitTools
Latest Updated
2025-06-15
Github Stars
0.02K

How to Install MW-ComfyUI_PortraitTools

Install this extension via the ComfyUI Manager by searching for MW-ComfyUI_PortraitTools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter MW-ComfyUI_PortraitTools in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ID Photos Description

Automate professional ID photo creation with size and background adjustments for official documents.

ID Photos:

The IDPhotos node is designed to facilitate the creation of professional ID photos by processing input images to meet specific size and background requirements. This node is particularly useful for generating standardized photos for various official documents, such as passports, visas, and identification cards. It offers capabilities to align and crop faces, adjust image dimensions, and remove or change backgrounds, ensuring that the final output adheres to the required specifications. By automating these tasks, the IDPhotos node simplifies the process of producing high-quality ID photos, saving time and effort for users who need to generate multiple images for different purposes.

ID Photos Input Parameters:

image

This parameter accepts the input image that you want to process into an ID photo. The image should be in a format that the node can handle, such as JPEG or PNG. The quality and resolution of the input image will affect the final output, so it's recommended to use a high-resolution image for best results.

rmbg_model

This parameter specifies the model used for removing the background from the image. You can choose from a list of available models, with "RMBG-2.0" being the default option. The choice of model can impact the accuracy and quality of the background removal process.

unload_model

This boolean parameter determines whether the model should be unloaded from memory after processing. The default value is True, which helps free up system resources. If you plan to process multiple images in succession, you might set this to False to avoid reloading the model each time.

bg_color

This parameter allows you to select the background color for the final ID photo. Options include "Alpha" (transparent), "black", "white", "gray", "green", "pure_blue", "pure_red", "cornflower_blue", "crimson_red", "dark_slate_blue", and "snow_white". The default is "Alpha", which means no background color is applied.

size

This parameter defines the size of the ID photo. You can choose from a predefined list of sizes, such as "一寸,413,295" or "美国签证,600,600". The size affects the dimensions of the output image and should be selected based on the specific requirements of the document for which the ID photo is intended.

face_reduction

This parameter controls the amount of padding around the face in the final image. It is a float value with a default of 1.0, a minimum of 0.0, and a maximum of 5.0. Adjusting this value can help ensure that the face is properly centered and sized within the ID photo.

face_up_down

This parameter adjusts the vertical position of the face within the image. It is a float value with a default of 0.0, a minimum of -0.5, and a maximum of 0.5. This can be useful for fine-tuning the alignment of the face in the final output.

angle_offset

This parameter allows you to adjust the angle of the face in the image. It is a float value with a default of 1.0, a minimum of -10.0, and a maximum of 10.0. This can help correct any tilt in the original image to ensure the face is level in the ID photo.

kb

This parameter is not explicitly described in the context, but it likely refers to a setting related to the image processing, such as a quality or compression level. Adjusting this parameter can affect the final output's quality and file size.

dpi

This parameter sets the dots per inch (DPI) for the output image, with a default value of 300. DPI is a measure of image resolution, and a higher DPI can result in a clearer and more detailed photo, which is important for printing purposes.

ID Photos Output Parameters:

standard_photo

This output is the processed ID photo with standard resolution and background adjustments applied. It is suitable for digital use or printing at standard sizes.

hd_photo

This output is a high-definition version of the ID photo, offering enhanced resolution and detail. It is ideal for situations where a higher quality image is required.

This output consists of the ID photo formatted for printing, ensuring that it meets the specified size and resolution requirements for physical copies.

ID Photos Usage Tips:

  • Ensure your input image is of high quality and resolution to achieve the best results in the final ID photo.
  • Choose the appropriate size and background color based on the specific requirements of the document for which the ID photo is intended.
  • Use the face_reduction, face_up_down, and angle_offset parameters to fine-tune the alignment and positioning of the face in the image.
  • Consider setting unload_model to False if you are processing multiple images in a batch to save time on model loading.

ID Photos Common Errors and Solutions:

"Model not found"

  • Explanation: The specified background removal model is not available or not correctly loaded.
  • Solution: Ensure that the model name is correctly specified and that the model files are properly installed and accessible.

"Invalid image format"

  • Explanation: The input image is not in a supported format.
  • Solution: Convert the image to a supported format such as JPEG or PNG before processing.

"Size not recognized"

  • Explanation: The specified size is not in the predefined list of sizes.
  • Solution: Select a size from the available options or ensure the size string is correctly formatted.

"Background color not available"

  • Explanation: The chosen background color is not in the list of available colors.
  • Solution: Select a background color from the provided options to ensure compatibility.

ID Photos Related Nodes

Go back to the extension to check out more related nodes.
MW-ComfyUI_PortraitTools
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.