Add support for negative prompt weighting #47
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.
Description
Thank you both so much for the very rapid response to issue #43 with pull request #46!
I think it would be good to support prompt weights on the negative prompt as well. I believe this is supported when not using OpenVINO acceleration.
I think I have been able to implement this myself following the example of #46.
Screenshots/videos:
I've experimented with prompt:
and negative prompt:
If I run this without OpenVINO acceleration, I get:
If I run this with OpenVINO acceleration without this code change, I get:
Note that the two are different.
With OpenVINO acceleration with this code change, I get:
This more-or-less matches the non-accelerated version, which suggests to me that the change is working correctly.
Checklist:
(I have tried to run the tests but they fail with an error "No module named 'gradio'". This happens with or without my code change.)