Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for negative prompt weighting #47

Merged

Conversation

sjrummins
Copy link

@sjrummins sjrummins commented Sep 8, 2023

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:

Evening street scene, New York, 1930

and negative prompt:

lamp, (people:1.5)

If I run this without OpenVINO acceleration, I get:
00018-879204008-fixedprompt-cpu-2m50

If I run this with OpenVINO acceleration without this code change, I get:
00020-879204008-fixedprompt-openvino-1m49
Note that the two are different.

With OpenVINO acceleration with this code change, I get:
00019-879204008-fixedprompt-openvinopatched-1m18
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.)

@sjrummins
Copy link
Author

I installed gradio and the tests now pass.

@devangaggarwal
Copy link
Collaborator

Great work, @sjrummins ! LGTM, @ynimmaga can you review as well.

@qiacheng qiacheng merged commit 5f2b8d9 into openvinotoolkit:develop Sep 13, 2023
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.

3 participants