Skip to content

Commit 988524a

Browse files
committed
Merge branch 'experimental' into adetailer
2 parents a8b970b + d32c30a commit 988524a

File tree

7 files changed

+37
-47
lines changed

7 files changed

+37
-47
lines changed

api/routes/models.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def delete_model(req: DeleteModelRequest):
249249

250250
@router.post("/download-model")
251251
def download_checkpoint(
252-
link: str, model_type: Literal["Checkpoint", "TextualInversion", "LORA"]
252+
link: str, model_type: Literal["Checkpoint", "TextualInversion", "LORA", "VAE"]
253253
) -> str:
254254
"Download a model from a link and return the path to the downloaded file."
255255

@@ -260,7 +260,12 @@ def download_checkpoint(
260260
folder = "textual-inversion"
261261
elif mtype == "lora":
262262
folder = "lora"
263+
elif mtype == "vae":
264+
folder = "vae"
263265
else:
264266
raise ValueError(f"Unknown model type {mtype}")
265267

266-
return download_file(link, Path("data") / folder, True).as_posix()
268+
saved_path = download_file(link, Path("data") / folder, True).as_posix()
269+
websocket_manager.broadcast_sync(Data(data_type="refresh_models", data={}))
270+
271+
return saved_path

core/config/api_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class APIConfig:
3131
"xformers", "sdpa", "cross-attention", "subquadratic", "multihead"
3232
] = "sdpa"
3333
subquadratic_size: int = 512
34-
attention_slicing: Union[int, Literal["auto", "disabled"]] = "disabled"
34+
attention_slicing: Union[int, Literal["auto", "disabled"]] = "auto"
3535
channels_last: bool = True
3636
trace_model: bool = False
3737
clear_memory_policy: Literal["always", "after_disconnect", "never"] = "always"
@@ -88,7 +88,7 @@ class APIConfig:
8888

8989
# Hypertile
9090
hypertile: bool = False
91-
hypertile_unet_chunk: int = 256
91+
hypertile_unet_chunk: int = 512
9292

9393
# Kohya Deep-Shrink
9494
deepshrink_enabled: bool = True

frontend/dist/assets/ModelsView.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6602,7 +6602,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
66026602
useCssVars((_ctx) => {
66036603
var _a, _b;
66046604
return {
6605-
"3d50ed98": (_b = (_a = unref(theme)) == null ? void 0 : _a.Card) == null ? void 0 : _b.color
6605+
"66e6d45b": (_b = (_a = unref(theme)) == null ? void 0 : _a.Card) == null ? void 0 : _b.color
66066606
};
66076607
});
66086608
const theme = inject(themeOverridesKey);
@@ -6767,22 +6767,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
67676767
value: types.value,
67686768
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => types.value = $event),
67696769
options: [
6770-
{
6771-
value: "",
6772-
label: "All"
6773-
},
6770+
{ value: "", label: "All" },
67746771
{
67756772
value: "Checkpoint",
67766773
label: "Checkpoint"
67776774
},
6778-
{
6779-
value: "TextualInversion",
6780-
label: "Textual Inversion"
6781-
},
6782-
{
6783-
value: "LORA",
6784-
label: "LORA"
6785-
}
6775+
{ value: "TextualInversion", label: "Textual Inversion" },
6776+
{ value: "LORA", label: "LORA" },
6777+
{ value: "VAE", label: "VAE" }
67866778
],
67876779
style: { "margin-right": "4px" }
67886780
}, null, 8, ["value"]),
@@ -6831,7 +6823,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
68316823
};
68326824
}
68336825
});
6834-
const CivitAIDownload = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-241a4664"]]);
6826+
const CivitAIDownload = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-89afc237"]]);
68356827
const _hoisted_1$3 = ["src"];
68366828
const _hoisted_2$3 = { style: { "position": "absolute", "width": "100%", "bottom": "0", "padding": "0 8px 0 12px", "min-height": "32px", "overflow": "hidden", "box-sizing": "border-box", "backdrop-filter": "blur(12px)", "background-color": "rgba(0, 0, 0, 0.3)" } };
68376829
const _hoisted_3$3 = { style: { "display": "flex", "flex-direction": "column" } };

frontend/dist/assets/index.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@
5959
justify-content: center;
6060
}
6161

62-
.progress-container[data-v-fd90df03] {
62+
.progress-container[data-v-3a99505a] {
6363
margin: 12px;
6464
flex-grow: 1;
6565
width: 400px;
6666
}
67-
.top-bar[data-v-fd90df03] {
67+
.top-bar[data-v-3a99505a] {
6868
display: inline-flex;
6969
align-items: center;
7070
padding-top: 10px;
7171
padding-bottom: 10px;
72-
width: var(--0ccf3a18);
72+
width: var(--ca9a9586);
7373
height: 32px;
7474
position: fixed;
7575
top: 0;
7676
z-index: 1;
7777
}
78-
.logo[data-v-fd90df03] {
78+
.logo[data-v-3a99505a] {
7979
margin-right: 16px;
8080
margin-left: 16px;
8181
}
@@ -158,13 +158,13 @@
158158
justify-content: center;
159159
}
160160

161-
.image-grid[data-v-241a4664] {
161+
.image-grid[data-v-89afc237] {
162162
display: grid;
163163
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
164164
grid-gap: 8px;
165165
}
166-
.top-bar[data-v-241a4664] {
167-
background-color: var(--3d50ed98);
166+
.top-bar[data-v-89afc237] {
167+
background-color: var(--66e6d45b);
168168
}
169169

170170
.install[data-v-b405f046] {

frontend/dist/assets/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42354,7 +42354,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4235442354
};
4235542355
}
4235642356
});
42357-
const _withScopeId = (n) => (pushScopeId("data-v-fd90df03"), n = n(), popScopeId(), n);
42357+
const _withScopeId = (n) => (pushScopeId("data-v-3a99505a"), n = n(), popScopeId(), n);
4235842358
const _hoisted_1$2 = { class: "top-bar" };
4235942359
const _hoisted_2$1 = { key: 0 };
4236042360
const _hoisted_3$1 = { key: 0 };
@@ -42380,7 +42380,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4238042380
__name: "TopBar",
4238142381
setup(__props) {
4238242382
useCssVars((_ctx) => ({
42383-
"0ccf3a18": topBarWidth.value
42383+
"ca9a9586": topBarWidth.value
4238442384
}));
4238542385
const router2 = useRouter();
4238642386
const websocketState = useWebsocket();
@@ -42659,7 +42659,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4265942659
"Content-Type": "application/json"
4266042660
},
4266142661
body: JSON.stringify({
42662-
model: global2.state.selected_model.name,
42662+
model: global2.state.selected_model.path,
4266342663
vae: vae.path
4266442664
})
4266542665
});
@@ -42680,7 +42680,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4268042680
"Content-Type": "application/json"
4268142681
},
4268242682
body: JSON.stringify({
42683-
model: global2.state.selected_model.name,
42683+
model: global2.state.selected_model.path,
4268442684
textual_inversion: textualInversion.path
4268542685
})
4268642686
});
@@ -43412,14 +43412,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4341243412
};
4341343413
}
4341443414
});
43415-
const TopBar_vue_vue_type_style_index_0_scoped_fd90df03_lang = "";
43416-
const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-fd90df03"]]);
43415+
const TopBar_vue_vue_type_style_index_0_scoped_3a99505a_lang = "";
43416+
const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-3a99505a"]]);
4341743417
const Prompt_vue_vue_type_style_index_0_lang = "";
4341843418
const Prompt_vue_vue_type_style_index_1_scoped_780680bc_lang = "";
4341943419
const ControlNet_vue_vue_type_style_index_0_scoped_d4ff54ab_lang = "";
4342043420
const Img2Img_vue_vue_type_style_index_0_scoped_a4145f6c_lang = "";
4342143421
const Inpainting_vue_vue_type_style_index_0_scoped_b1671b35_lang = "";
43422-
const CivitAIDownload_vue_vue_type_style_index_0_scoped_241a4664_lang = "";
43422+
const CivitAIDownload_vue_vue_type_style_index_0_scoped_89afc237_lang = "";
4342343423
const HuggingfaceDownload_vue_vue_type_style_index_0_scoped_b405f046_lang = "";
4342443424
const _hoisted_1$1 = { style: { "margin": "16px 0" } };
4342543425
const _hoisted_2 = /* @__PURE__ */ createBaseVNode("b", null, "Key in question:", -1);

frontend/src/components/TopBar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ async function loadVAE(vae: ModelEntry) {
784784
"Content-Type": "application/json",
785785
},
786786
body: JSON.stringify({
787-
model: global.state.selected_model.name,
787+
model: global.state.selected_model.path,
788788
vae: vae.path,
789789
}),
790790
});
@@ -806,7 +806,7 @@ async function loadTextualInversion(textualInversion: ModelEntry) {
806806
"Content-Type": "application/json",
807807
},
808808
body: JSON.stringify({
809-
model: global.state.selected_model.name,
809+
model: global.state.selected_model.path,
810810
textual_inversion: textualInversion.path,
811811
}),
812812
});

frontend/src/components/models/CivitAIDownload.vue

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,14 @@
4646
<NSelect
4747
v-model:value="types"
4848
:options="[
49-
{
50-
value: '',
51-
label: 'All',
52-
},
49+
{ value: '', label: 'All' },
5350
{
5451
value: 'Checkpoint',
5552
label: 'Checkpoint',
5653
},
57-
{
58-
value: 'TextualInversion',
59-
label: 'Textual Inversion',
60-
},
61-
{
62-
value: 'LORA',
63-
label: 'LORA',
64-
},
54+
{ value: 'TextualInversion', label: 'Textual Inversion' },
55+
{ value: 'LORA', label: 'LORA' },
56+
{ value: 'VAE', label: 'VAE' },
6557
]"
6658
style="margin-right: 4px"
6759
/>
@@ -113,7 +105,8 @@ const theme = inject(themeOverridesKey);
113105
const loadingLock = ref(false);
114106
const currentPage = ref(1);
115107
const sortBy = ref("Most Downloaded");
116-
const types: Ref<"Checkpoint" | "TextualInversion" | "LORA" | ""> = ref("");
108+
const types: Ref<"Checkpoint" | "TextualInversion" | "LORA" | "VAE" | ""> =
109+
ref("");
117110
118111
const currentModel = ref<ICivitAIModel | null>(null);
119112
const showModal = ref(false);

0 commit comments

Comments
 (0)