lebenoa / webui-api

GO API for AUTOMATIC1111's SD Web UI.
MIT License
31 stars 13 forks source link

API use for lora additional networks #2

Open twitset opened 1 year ago

twitset commented 1 year ago

First of all thanks for the API. It looks promising.

Is it possible to use sd-webui-additional-networks script as part of the api.Txt2Image call to include LoRAs in the inference?

lebenoa commented 1 year ago

Sorry for the late reply. It was midnight - 1 AM at the place I live.

Anyway, I think this fork will work and I just found out that there's a field call alwayson_scripts now so I'll update the field soon image

twitset commented 1 year ago

Thanks so much for your reply. That's awesome. Right now I am sending requests with fn_index:[] over the /api/predict endpoint, which doesn't feel right.

lebenoa commented 1 year ago

I managed to get it working but will you be conformable doing this?

image

IMO I don't really like it and I don't have an idea how to improve this. Do you have any ideas?

twitset commented 1 year ago

I can give it a shot. It's better than what I am doing. I am generating a text template for the request to /api/predict.

image
twitset commented 1 year ago

I guess the "go way" to get more non-generic will be to implement an API interface for the important scripts that are most used. I will check if I can manage to implement one for sd-webui-additional-networks

twitset commented 1 year ago

I have implemented controlnet and as soon as I figure out how to create pull requests, I can send them.

lebenoa commented 1 year ago

You can create a fork. Commit the changes to the fork and then create pull request.