Fix img2img-alternative-test script for SD v2.x #8772
Merged
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.
It produced completely broken nonsense output on SD v2 previously.
Now it generates... relatively similar to SD v1. V1 in my tests makes slightly garbled outputs, and V2 seems to amplify contrast. Different output issues, but either way, it's gone from "not working" to "just kinda weird". V1 outputs shouldn't be changed at all by this PR.
Fix is straight forward - just use the v denoiser when v is needed, and skip the redundant var from
get_scalings
(it's literally namedc_skip
in external source, so...)Tested and validated that it works the same on SD v1.x, and now works (ish) on SD v2.
I'm not here to clean up that whole script file, it's a mess, but I removed some of the stray spaces and unused imports as just a bit of tidiness while I'm touching the file anyway.
Followup work to clean up the code and/or just overall improve the quality/capability on either SD version might be worthwhile.