Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit 93aea72

Browse files
committed
Refactor image model configuration
1 parent 124d226 commit 93aea72

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/models/image/sh.ts

+23-21
Original file line numberDiff line numberDiff line change
@@ -256,27 +256,6 @@ async function generateAsync(data) {
256256
if (data.seed) {
257257
formatData.params.seed = data.seed;
258258
}
259-
if (data.model) {
260-
if (data.model == "TURBO XL") {
261-
formatData.model = "SDXL 1.0";
262-
formatData.params = {
263-
...formatData.params,
264-
loras: [
265-
{
266-
"name": "246747",
267-
"model": 1,
268-
"clip": 1,
269-
"is_version": true
270-
}
271-
]
272-
}
273-
} else {
274-
formatData.models = [data.model];
275-
}
276-
277-
} else {
278-
formatData.models = ["SDXL 1.0"];
279-
}
280259

281260
if (data.nsfw) {
282261
formatData.nsfw = true;
@@ -305,6 +284,29 @@ async function generateAsync(data) {
305284
if (data.strength) {
306285
formatData.params.denoising_strength = data.strength;
307286
}
287+
if (data.model) {
288+
if (data.model == "TURBO XL") {
289+
formatData.model = "SDXL 1.0";
290+
formatData.params.steps = 8
291+
formatData.params = {
292+
...formatData.params,
293+
loras: [
294+
{
295+
"name": "246747",
296+
"model": 1,
297+
"clip": 1,
298+
"is_version": true
299+
}
300+
]
301+
}
302+
} else {
303+
formatData.models = [data.model];
304+
}
305+
306+
} else {
307+
formatData.models = ["SDXL 1.0"];
308+
}
309+
308310
formatData.shared = true;
309311
formatData.r2 = false;
310312
let res = await axios({

0 commit comments

Comments
 (0)