-
Notifications
You must be signed in to change notification settings - Fork 296
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
Is there a way to use additional networks in the webui api? #105
Comments
did you find the solution for this? XD |
You can charge lora if it's inside models/Lora folder with lora:nameofthemodel:quantity in the prompt. If you have inside your Lora's folder: potatoe.safetensors you must use: lora:potatoe:1.0 |
Thanks for your reply. It only works for some Lora models, but it error for others:
All the models would work fine if I used Addtional Networks. Maybe these Lora models and my webui are different versions? |
I forgot the quotes hhashha, it should be lora:model:1.0 |
Sorry:
|
Yes, I used this form. In the UI, after clicking Generate, In the api, after add lora:model:1.0 in my prompt, webui told me For convenience's sake, I just assigned And then there's this: |
In which folder are your Lora models stored? |
stable-diffusion-webui/models/Lora |
Hmm It doesn't seem to be a problem with the models. Check the webui settings but idk if you can change Lora's folder from there |
Forget it, I'd rather use Addtional Networks in the UI. Thank you for your patience:> |
One possibility is to use this extension of mine and put the model name into the prompt, and let the inner extension logic take care of swapping out the networks: https://github.com/space-nuko/a1111-stable-diffusion-webui-randomizer-keywords So you'd just be able to put |
That's a wonderful extension! It works well in the UI interface, but there was an
I printed Should I add something into |
If you still have your issue and are up for it. You can try out my webui PR. If you have the keyword extension and add some for the first net, you might be able to use the txt2img example request almost as is since it's going to override the args passed to the script anyways. I did have to do 2 small fixes to this extension to make it play well with this. They are to make sure it restores the network after a request and so it doesn't throw an error if it gets an empty tuple as an arg. Not exactly sure if these fixes end up having unwanted effect though. |
It works! Thanks for your contributions! |
I'm attempting to call the additional networks lora implementation through the api, but i'm really struggling to figure out how to do this. Here is the api call i'm trying to make to the sdapi/v1/txt2img: { I am unable to get the lora to load properly using the autmoatic1111 prompt injection. The UI for additional networks is the only thing that consistently works properly. Does anybody know how to generate an image over the api and activate the additional networks features? What I'm really trying to do is trigger an xyz plot of a bunch of different Lora models programmatically via the api. The UI functionality works perfectly with additional networks. if anybody has any idea how i could do this via the API I would really appreciate it. |
I also want to load Lora through the img2img API. Have you resolved this issue? |
Hello guys! I am attempting to use the lora models with API as well. So I suppose the same story as @unoriginalscreenname |
I want to use additional networks in the webui api
My payload looks like this:
I want to use a lora model now, what changes do I need to make in the payload, maybe in
script_args
?The text was updated successfully, but these errors were encountered: