fix: sd3 model default select
This commit is contained in:
parent
2b0153807c
commit
74b915a790
|
@ -23,7 +23,7 @@ const sdCommonParams = (model: string, data: any) => {
|
||||||
name: locales.SdPanel.ModelVersion,
|
name: locales.SdPanel.ModelVersion,
|
||||||
value: "model",
|
value: "model",
|
||||||
type: "select",
|
type: "select",
|
||||||
default: 0,
|
default: "sd3-medium",
|
||||||
support: ["sd3"],
|
support: ["sd3"],
|
||||||
options: [
|
options: [
|
||||||
{ name: "SD3 Medium", value: "sd3-medium" },
|
{ name: "SD3 Medium", value: "sd3-medium" },
|
||||||
|
@ -311,6 +311,7 @@ export function SdPanel() {
|
||||||
img_data: "",
|
img_data: "",
|
||||||
};
|
};
|
||||||
sendSdTask(data, sdListDb, execCountInc, () => {
|
sendSdTask(data, sdListDb, execCountInc, () => {
|
||||||
|
console.log(currentModel.value);
|
||||||
setParams(getModelParamBasicData(columns, params, true));
|
setParams(getModelParamBasicData(columns, params, true));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { initDB, useIndexedDB } from "react-indexed-db-hook";
|
||||||
import { StabilityPath, StoreKey } from "@/app/constant";
|
import { StabilityPath, StoreKey } from "@/app/constant";
|
||||||
import { create, StoreApi } from "zustand";
|
import { create, StoreApi } from "zustand";
|
||||||
import { showToast } from "@/app/components/ui-lib";
|
import { showToast } from "@/app/components/ui-lib";
|
||||||
|
import { getHeaders } from "@/app/client/api";
|
||||||
|
|
||||||
export const SdDbConfig = {
|
export const SdDbConfig = {
|
||||||
name: "@chatgpt-next-web/sd",
|
name: "@chatgpt-next-web/sd",
|
||||||
|
@ -66,9 +67,12 @@ export function stabilityRequestCall(data: any, db: any, inc: any) {
|
||||||
for (let paramsKey in data.params) {
|
for (let paramsKey in data.params) {
|
||||||
formData.append(paramsKey, data.params[paramsKey]);
|
formData.append(paramsKey, data.params[paramsKey]);
|
||||||
}
|
}
|
||||||
|
const headers = getHeaders();
|
||||||
|
delete headers["Content-Type"];
|
||||||
fetch(`/api/stability/${StabilityPath.GeneratePath}/${data.model}`, {
|
fetch(`/api/stability/${StabilityPath.GeneratePath}/${data.model}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
...headers,
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
},
|
},
|
||||||
body: formData,
|
body: formData,
|
||||||
|
|
Loading…
Reference in New Issue