Skip to content

Conversation

@kohya-ss
Copy link
Owner

Closes #678, ref #680.

@kohya-ss kohya-ss marked this pull request as ready for review October 25, 2025 13:03
@kohya-ss kohya-ss requested a review from Copilot October 25, 2025 13:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves control image matching by implementing a sorted matching strategy and preventing duplicate matches. The changes address issues #678 and #680 by ensuring that control images are correctly paired with their corresponding source images, particularly when image names share common prefixes.

  • Sorts image paths by basename length (longest first) to prioritize more specific matches
  • Pre-loads all control images into a set and removes them after matching to prevent duplicates
  • Replaces glob-based matching with startswith filtering for more precise control

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kohya-ss kohya-ss requested a review from Copilot October 25, 2025 13:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kohya-ss kohya-ss merged commit 6328e59 into main Oct 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug: Control Image Matching Logic Issue in ImageDirectoryDatasource

1 participant