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]: API endpoint to get user metadata for Extra Networks and Checkpoints #16176

Open
1 task done
DrCyanide opened this issue Jul 9, 2024 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@DrCyanide
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 ?

In the WebUI users can set things like Activation Text, Preferred Weight, and Notes for Loras, Hypernetworks, etc. The .json files also contain details for which version of Stable Diffusion the Lora can be used for. It would be extremely valuable for projects with different frontends if that information could be accessed via the API. Plugins for Krita or addons for Blender could access presets the user had already saved on the server, without the user needing to remember all the activation text.

The current /sdapi/v1/loras endpoint returns a metadata section, but it doesn't include any of the user_metadata fields.

Proposed workflow

  1. /sdapi/v1/sd-models would include an "sd version" field for the models.
  2. /sdapi/v1/loras, /sdapi/v1/hypernetworks, /sdapi/v1/embeddings, and /sd_extra_networks/metadata could all include the metadata that's saved in the .json files for these extra networks
  3. A new endpoint to update the .json metadata - likely `/sd_extra_networks/user_metadata/'. Parameters would be a file path or the name of the Lora, as well as a post body.

For reference, here's what the .json documents currently look like

{
    "description": "My Example Lora",
    "sd version": "SD1",
    "activation text": "really_cool, best_devs, plz_add_feature",
    "preferred weight": 0.8,
    "notes": ""
}

With those pieces of information, tools that interact with the API can give users a much better

Additional information

No response

@DrCyanide DrCyanide added the enhancement New feature or request label Jul 9, 2024
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

1 participant