ljleb / sd-webui-freeu

a1111 implementation of https://github.com/ChenyangSi/FreeU
MIT License
301 stars 16 forks source link

append api #30

Closed meicich closed 11 months ago

meicich commented 11 months ago

Currently it is only implemented on the sd webui GUI, but I would like it to be implemented so that it can also be run on the sd webui API.

"/docs" can open fastapi

If possible, I would like to be able to specify it by adding it to the "/sdapi/v1/txt2img" parameter.

ljleb commented 11 months ago

There's a way to do this using the "alwayson_scripts": { "freeu": { "args": [...] } } parameter. At the moment the API is pretty bad, you have to pass a flattened list of all the parameters. Supporting parsing a list of dictionaries would help to keep API calls more manageable and backwards compatible.

meicich commented 11 months ago

I didn't know how to do it!

I tried it and it worked! thanks so much!

ljleb commented 11 months ago

I'll keep this open until there is a more reliable way to pass values by the api. If we ever add more controls at each stage, previously fine api calls will stop working.

ljleb commented 11 months ago

I updated the readme with more stable usage examples.