[Feature Request]: add API method to get LoRA models
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What would your feature do ?
I see there are API methods to fetch models, embeddings, samplers, hypernetworks, upscalers, etc - but there currently seems to be no way to fetch a list of available LoRA models via the API. Would be great to have!
Proposed workflow
If it worked exactly like the existing /sdapi/v1/hypernetworks API method, that'd be perfect IMO. Just a simple request that returns a list of available LoRA models.
Additional information
No response
/sdapi/v1/cmd-flags
you can get the main path with "data_dir" value
and then? With the Lora path in hand, how do I enumerate the lora files and thumbnails through the api?
You can't at the moment via the API.
You'll need to build your own list using the Lora path. For my own application, I just assume that all files in that directory with a valid lora extension are loras. It's not perfect but it should work fine unless users drop non-lora files that are named like loras there.
how to get the lora api at file path "models\Lora"
Is there any progress now? I need to access the machine remotely, so I can't get the lora model list even if I get the folder path.
https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/10194