You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calculate prefix length: The length of filename_prefix is 12 ("PoseKeypoint").
Extract prefix: prefix is filename[:13] (the first 13 characters), which is "PoseKeypoint_".
Extract digits: The remaining part is "00001_.json", which is split to get "00001" and converted to the integer 1.
Return result: (1, "PoseKeypoint_").
Example 2: filename = "PoseKeypoint_00001.json"
Calculate prefix length: Same as above, the prefix length is 12.
Extract prefix: prefix is still "PoseKeypoint_".
Extract digits: The remaining part is "00001.json", which is split to get "00001.json". The conversion fails, so digits is set to 0.
Return result: (0, "PoseKeypoint_").
Key Point: If filename_prefix does not include the trailing underscore, the second filename fails to convert the digits because the number is directly followed by .json, resulting in digits=0.
file = f"{filename}_{counter:05}_.json"
This change ensures that the file naming convention aligns with the validation logic in the code, which expects files to end with an underscore.
The text was updated successfully, but these errors were encountered:
Hi, I noticed a potential issue with the file naming pattern in the code. Currently, the file is named using the following format:
comfyui_controlnet_aux/node_wrappers/pose_keypoint_postprocess.py
Line 62 in 1e9eac6
However, based on the logic in the ComfyUI project, specifically in this section:
https://github.com/comfyanonymous/ComfyUI/blob/be4e760648e0234f9202b9cbe7dcfb3bd307acb9/folder_paths.py#L352
Example 1: filename = "PoseKeypoint_00001_.json"
Calculate prefix length: The length of filename_prefix is 12 ("PoseKeypoint").
Extract prefix: prefix is filename[:13] (the first 13 characters), which is "PoseKeypoint_".
Extract digits: The remaining part is "00001_.json", which is split to get "00001" and converted to the integer 1.
Return result: (1, "PoseKeypoint_").
Example 2: filename = "PoseKeypoint_00001.json"
Calculate prefix length: Same as above, the prefix length is 12.
Extract prefix: prefix is still "PoseKeypoint_".
Extract digits: The remaining part is "00001.json", which is split to get "00001.json". The conversion fails, so digits is set to 0.
Return result: (0, "PoseKeypoint_").
Key Point: If filename_prefix does not include the trailing underscore, the second filename fails to convert the digits because the number is directly followed by .json, resulting in digits=0.
This change ensures that the file naming convention aligns with the validation logic in the code, which expects files to end with an underscore.
The text was updated successfully, but these errors were encountered: