-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
SD Api Pics extension, v.1.1 #596
Conversation
It's looking great! I'm really excited for this. |
extensions/sd_api_pictures/script.py
Outdated
@@ -105,7 +122,7 @@ def output_modifier(string): | |||
""" | |||
This function is applied to the model outputs. | |||
""" | |||
global pic_id, picture_response, streaming_state | |||
global pic_id, picture_response, params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice, if there is a way, to skip generating image when loading character which already has some history (now it generates picture, but it is not visible anywhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa that's a nice catch! Can you list the exact steps to reproduce it?
Gonna think if I can actually override that behaviour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Steps: Open some character, select Adventure mode, generate some text with images, switch character, switch back to one with images in history. This will issue new SD request and take some time to load as image is being generated. I use gallery extension for switching characters, but I think same happens when using Character tab.
extensions/sd_api_pictures/script.py
Outdated
r = response.json() | ||
del response | ||
del r | ||
|
||
payload = { | ||
"prompt": params['prompt_prefix'] + description, | ||
"seed": -1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have seed, sampler_name, steps and cfg_scale configurable as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why you'd want to manually specify a seed when an AI is randomly generating the prompt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some times same seed provides similar images on slightly different promts, it helps to get more consistent characters/visuals (or I am just seeing things)
Okay, just a little checklist to keep my thoughts organized:
|
using regenerate display "is typing" instead of "Is sending a picture" |
93ca91a
to
cde74e7
Compare
@laughinggaschambers that's unfortunate but I can't detect re-generations; so if you didn't like the image it sent you'll have to 'remove-last' and then 'generate' instead |
f125b0d
to
efc2dc8
Compare
Hi, I have an issue with this plugin whereas the generated picture only quickly flashes and instantly disappears. Also the HTML displays nothing between the textbox divs.
` |
@Brawlence would it make sense to merge current PR and address remaining issues with separate PRs? |
I agree with @vaidasmaciulis. There is no need for @Brawlence to overwhelm himself and try to fix everything at once. If there are not any new bugs in this PR that need to be addressed, I'd vote for merging it. |
Cleaning address, checking connection, removed enable checkbox, added VRAM management
Changes to the interface, separate width/height sliders, mode of operations, button to suppress gen
Load parameters from settings.json, factored out VRAM management, initial state of checkbox influences VRAM use, also on selecting mode generation state & suppress/force button are updated
Patch the viewport size override (non-configurable as of now) and make it used local saved files if this option is set
& Uniquify filenames with int ( epoch seconds )
399830b
to
4872029
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Review submitted because I was tagged for it) there's only one potentially-breaking issue I see, the https
part, and a lot of formatting, but that is stuff that can easily be worked on in followups
EDIT: gave it a testrun, worked flawlessly from the text-gen-webui side.
(The Auto WebUI side had errors, but, er, that's an auto webui issue unrelated. Extensions and API calls don't get along)
I'd say either good to pull now, or revert the change that breaks https
support and then pull.
Other things to improve aren't blockers.
+make seed, sampler_name, steps and cfg_scale configurable via setting.json
@vaidasmaciulis although nothing seems broken right now, for the last 3 or 4 days I couldn't really test the full extent of my changes because the flow kept breaking cause I want all the new features. I should have fixed the repo state, but oh well. @oobabooga thanks but don't worry, I am not really overwhelmed @mcmonkey4eva thanks, your feedback is invaluable! |
via the UI. Defaults are still loaded from settings.json on startup
Trigger is factored out, also subject detection should now be broader
Okay, finished with everything I wanted but readme. It's coming later™ |
In Manual mode, if I click on After that, the button text remains at |
@oobabooga so the state changes correctly but the button is not reset after the generation. Hmmmm Is there a way to access this button component outside of extension |
You can turn it into a global variable (inside script.py), like with |
Strangely, although declaring it globally does allow me to change its label, the rendered button won't automatically adjust. So, as it is seemingly useless as a feedback for the user, I'm splitting it in two buttons. There won't be any reliable indication for the state of the next reply (picture/regular), but one can always force it with those. |
for the new trigger detection regexp + adjusted layout a bit
I did some reorganizing/reformatting. Everything is working well on my end. I'm impressed at how engineered and detailed this extension has become. In particular, the new Thanks for the update, @Brawlence :) (and feel free to submit new PRs in the future if you come up with further enhancements) |
Lots of new things, gonna do a quick draft right now:
New features: API detection (press enter in the API box), more robust host address handing, VRAM management (model shuffling), separate image dimensions sliders for H&W, three different trigger modes (manual, interactive, always-on). The button to force/suppress the image on the next reply.
The model input is modified only in the interactive mode; other two are unaffected. The output pic description is presented differently for Picture-book / Adventure mode.
Connection check:

It's gonna strip the
http(s)://
part and the trailing/
if present and also return the status when pressing Enter in that field#533