Skip to content

First step of supporting save filenames without trailing _#13722

Merged
comfyanonymous merged 1 commit into
masterfrom
comfyanonymous-patch-1
May 6, 2026
Merged

First step of supporting save filenames without trailing _#13722
comfyanonymous merged 1 commit into
masterfrom
comfyanonymous-patch-1

Conversation

@comfyanonymous

Copy link
Copy Markdown
Member

get_save_image_path now properly supports filenames without trailing underscores.

This will be the saving behavior when using a mix of save image nodes using the old and the new format.

ComfyUI_00001_.png
ComfyUI_00002.png
ComfyUI_00003.png
ComfyUI_00004_.png

get_save_image_path now properly supports filenames without
trailing underscores.

This will be the saving behavior when using a mix of save image nodes using the old and the new format.

ComfyUI_00001_.png
ComfyUI_00002.png
ComfyUI_00003.png
ComfyUI_00004_.png
@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3b0ac9ba-d413-4895-ac7f-63100311e7aa

📥 Commits

Reviewing files that changed from the base of the PR and between e5369c0 and be997b8.

📒 Files selected for processing (1)
  • folder_paths.py

📝 Walkthrough

Walkthrough

The map_filename internal function within get_save_image_path in folder_paths.py was updated to extract numeric suffixes from filenames more robustly. The revised logic isolates the portion after the filename prefix, removes the extension by extracting the substring before the first dot, splits on the underscore character to isolate the numeric segment, and converts it to an integer. The previous implementation parsed digits directly from the substring following the prefix, which could fail in cases like prefix_001.png where the extension immediately follows the numeric portion.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: updating get_save_image_path to handle filenames without trailing underscores, which is the core objective of this PR.
Description check ✅ Passed The description is directly related to the changeset, explaining the new filename support behavior and providing concrete examples of the mixed format output.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@comfyanonymous comfyanonymous merged commit c168960 into master May 6, 2026
16 checks passed
@comfyanonymous comfyanonymous deleted the comfyanonymous-patch-1 branch May 6, 2026 00:00
simonri pushed a commit to simonri/ComfyUI-flash-attention-3 that referenced this pull request May 26, 2026
…#13722)

get_save_image_path now properly supports filenames without
trailing underscores.

This will be the saving behavior when using a mix of save image nodes using the old and the new format.

ComfyUI_00001_.png
ComfyUI_00002.png
ComfyUI_00003.png
ComfyUI_00004_.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant