Support changing checkpoint and vae through override_settings#5191
Conversation
|
Would very much appreciate this PR landing! |
|
My app had a model swapper for quite a while now, through old api (by sending through |
|
@Kilvoctu The use case would be to let a single POST request do the settings and can revert back to the original one after its done. You can see #4301 (comment) for the use case |
|
For me, I have multiple clients talking to the same SD API, each wanting to use their own model; they can happily wait, but at present they end up stepping over each other because one client sets the model and the second client issues a request, and neither party receives what they expect. The SD API internally queues its requests, so it can switch model only when required for the specific request it's servicing. |
|
Hm yea, that is making sense. Now that I think about it, I even talk about the use of So if I understand |
Yes |
|
The only thing I'm not sure about is the swapping back: that seems like it could result in a lot of unnecessary swapping if you have multiple requests all using the same model. Maybe make that an option as well? |
I think in that case its better to just use the options API. If you cache them in RAM, the swapping back takes less than a second. And it is the core function of such a 'temporary' setting thing. |
|
The problem with using the options API is the issue with the queuing; a request can be serviced much after the initial request, so that if you have 5 requests with Model A queued up, and then request options = Model B followed by your model B generation request, the Model A requests will end up using Model B as the options API applies immediately. To solve that, I'd either need:
I have quite a few models, so keeping them in RAM isn't super feasible :( I'm leaning towards 1), just because I think that's generally useful anyway (it doesn't make much sense to have the settings override break things for queued generations) |
|
Any updates if this is close to being merged? |
|
why not just call the callback at this point? |
|
@AUTOMATIC1111 Race conditions
…On Sat, Dec 10, 2022 at 1:30 AM AUTOMATIC1111 ***@***.***> wrote:
why not just call the callback at this point?
—
Reply to this email directly, view it on GitHub
<#5191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGUU5UGSSLM5XUZINEOYHLWMQPSFANCNFSM6AAAAAASN76ZAA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
I get it now. The |
Allow user to temporarily change vae and checkpoint using override_settings field in the POST request.
Addresses #4301 (comment)
Closes #3703
Closes #5316
cc @Kilvoctu you might be interested in this PR