Repository navigation
FIX: include filter content in ImagePromptStyleConverter identifier - #3398
Open
Pushpak Siva Sai (Pushpak731) wants to merge 1 commit into
Open
Pushpak Siva Sai (Pushpak731) wants to merge 1 commit into
Pushpak Siva Sai (Pushpak731) wants to merge 1 commit into
Conversation
The converter names a custom filter after its file stem and its identifier recorded only that stem and the variation, so two custom filter files with the same name in different folders - or a custom file sharing a built-in filter's name - got the same identifier when their content differed. Registering the second converter raised a duplicate-name error, and memory and analytics attributed converted prompts to the wrong filter (microsoft#3386). The loaded style_instructions and variations, which are what the converter actually sends to the LLM, now ride the identifier params alongside filter_name and variation. Closes microsoft#3386
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3386
Problem
ImagePromptStyleConverterresolves a custom filter to its file stem and_build_identifier()recorded onlyfilter_nameandvariation. The filter'sstyle_instructionsandvariations— the content actually sent to the LLM — were not part of the identifier, so:team_a/noir.yamlvsteam_b/noir.yaml) shared one identifier,gritty_documentary.yaml) collided with the built-in,ConverterRegistryregistration raised a duplicate-name error and analytics attributed prompts to the wrong filter.Fix
style_instructionsandvariationsride the identifier params alongsidefilter_name/variation. Identical content still yields the identical identifier (same behavior = same identity); only genuinely different filters are told apart.Tests (6 new)
filter_name,style_instructions, andvariationsVerified the new tests fail on the unfixed identifier (mutation-checked).
Verification
tests/unit/converter/+tests/unit/registry/+ identifier suites — 3883 passed, 74 skippedI used AI to assist me with this change.