Skip to content
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

[Feature Request]: add API method to get LoRA models #7865

Closed
1 task done
rbbrdckybk opened this issue Feb 17, 2023 · 6 comments
Closed
1 task done

[Feature Request]: add API method to get LoRA models #7865

rbbrdckybk opened this issue Feb 17, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@rbbrdckybk
Copy link

Is there an existing issue for this?

  • 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

@rbbrdckybk rbbrdckybk added the enhancement New feature or request label Feb 17, 2023
@Fictiverse
Copy link

Fictiverse commented Feb 18, 2023

/sdapi/v1/cmd-flags

you can get the main path with "data_dir" value

@Oceanswave
Copy link

and then? With the Lora path in hand, how do I enumerate the lora files and thumbnails through the api?

@rbbrdckybk
Copy link
Author

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.

@yangdezuan
Copy link

how to get the lora api at file path "models\Lora"

@DumoeDss
Copy link
Contributor

DumoeDss commented May 7, 2023

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.

@catboxanon
Copy link
Collaborator

#10194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants