Skip to content

Help! Build my own frontend instead of using gradio. #16310

Answered by missionfloyd
Hamzajani153 asked this question in Q&A
Discussion options

You must be logged in to vote

/sdapi/v1/options
GET retrieves current settings, POST sets them.

await fetch("http://127.0.0.1:7860/sdapi/v1/options", {
    headers: {
        "Content-Type": "application/json"
    },
    method: "POST",
    body: {
        sd_model_checkpoint: "v1-5-pruned-emaonly.safetensors"
    }
});

Model menu example:

models.htm

<html>
    <body>
        <select id="model_list" style="width: 250px;"></select>
        <button id="btn_refresh_model">Refresh</button>
        <br>
        <select id="vae_list" style="width: 250px;"></select>
        <button id="btn_refresh_vae">Refresh</button>
        <script src="models.js"></script>
    </body>
</html>

models.js

document.querySelector("#btn_re…

Replies: 3 comments 16 replies

Comment options

You must be logged in to vote
1 reply
@Hamzajani153
Comment options

Comment options

You must be logged in to vote
1 reply
@Hamzajani153
Comment options

Answer selected by Hamzajani153
Comment options

You must be logged in to vote
14 replies
@pbejse
Comment options

@pbejse
Comment options

@pbejse
Comment options

@pbejse
Comment options

@pbejse
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants