mirror of
https://github.com/Stability-AI/StableStudio.git
synced 2026-05-16 23:15:56 +08:00
Merge pull request #76 from jtydhr88/webui-plugin-bug-fix
webui plugin bug fix - check empty str
This commit is contained in:
@@ -41,7 +41,7 @@ export async function setOptions(baseUrl: string | undefined, options: any) {
|
||||
}
|
||||
|
||||
export async function getImageInfo(
|
||||
baseUrl: string | undefined,
|
||||
baseUrl: string | null,
|
||||
base64image: any
|
||||
) {
|
||||
const imageInfoResponse = await fetch(`${baseUrl}/sdapi/v1/png-info`, {
|
||||
|
||||
@@ -94,7 +94,6 @@ export const createPlugin = StableStudio.createPlugin<{
|
||||
| "getStableDiffusionDefaultInput"
|
||||
| "getStableDiffusionExistingImages"
|
||||
> => {
|
||||
webuiHostUrl = webuiHostUrl ?? "http://127.0.0.1:7861";
|
||||
|
||||
return {
|
||||
createStableDiffusionImages: async (options) => {
|
||||
@@ -244,8 +243,11 @@ export const createPlugin = StableStudio.createPlugin<{
|
||||
};
|
||||
};
|
||||
|
||||
const webuiHostUrl =
|
||||
localStorage.getItem("webui-host-url") ?? "http://127.0.0.1:7861";
|
||||
let webuiHostUrl = localStorage.getItem("webui-host-url");
|
||||
|
||||
if (!webuiHostUrl || webuiHostUrl === "") {
|
||||
webuiHostUrl = "http://127.0.0.1:7861";
|
||||
}
|
||||
|
||||
return {
|
||||
...webuiLoad(webuiHostUrl),
|
||||
|
||||
Reference in New Issue
Block a user