|
@@ -172,7 +172,7 @@ const configSchema = {
|
|
|
dynamicOptions: { source: 'credentials', filter: { type: ['sdcpp', 'basic'] } }
|
|
dynamicOptions: { source: 'credentials', filter: { type: ['sdcpp', 'basic'] } }
|
|
|
},
|
|
},
|
|
|
batchCount: { title: "Batch Count", description: "Number of independent images to produce in this single job. Each image gets a different seed (`seed`, `seed+1`, …). Total VRAM doesn't grow with batch_count - sd.cpp serializes. Recommended: 1 for interactive, higher when you want a grid of variations from one prompt. Leave empty for the architecture default.", type: "number" },
|
|
batchCount: { title: "Batch Count", description: "Number of independent images to produce in this single job. Each image gets a different seed (`seed`, `seed+1`, …). Total VRAM doesn't grow with batch_count - sd.cpp serializes. Recommended: 1 for interactive, higher when you want a grid of variations from one prompt. Leave empty for the architecture default.", type: "number" },
|
|
|
- cacheMode: { title: "Cache Mode", description: "DiT-model intermediate caching strategy. Skips redundant computation across consecutive sampler steps when the model's intermediate state hasn't changed enough to matter. `easycache` is the simplest; `spectrum` is the newest, generally best for Flux/SD3/Z-Image. Recommended: spectrum for Flux/SD3/Z-Image when generation is too slow. Off for SD1.5/SDXL (UNet is too small for caching to win). Leave empty for the architecture default.", type: "string", enum: ["", "easycache", "spectrum"], enumLabels: ["(architecture default)", "EasyCache - single threshold, simple", "Spectrum - frequency-domain analysis (best quality/speed tradeoff)"], default: "" },
|
|
|
|
|
|
|
+ cacheMode: { title: "Cache Mode", description: "DiT-model intermediate caching strategy. Skips redundant computation across consecutive sampler steps when the model's intermediate state hasn't changed enough to matter. `easycache` is the simplest; `spectrum` is the newest, generally best for Flux/SD3/Z-Image. Recommended: spectrum for Flux/SD3/Z-Image when generation is too slow. Off for SD1.5/SDXL (UNet is too small for caching to win). Leave empty for the architecture default.", type: "string", enum: ["", "off", "easycache", "ucache", "dbcache", "taylorseer", "cache_dit", "spectrum"], enumLabels: ["(architecture default, which may switch it on)", "Off - no caching, whatever the architecture prefers", "EasyCache - single threshold, simple", "UCache", "DBCache", "TaylorSeer", "Cache-DiT", "Spectrum - frequency-domain analysis (best quality/speed tradeoff)"], default: "" },
|
|
|
cfgScale: { title: "CFG Scale", description: "Classifier-Free Guidance scale. Strength of pushing the cond toward the prompt vs the uncond. Higher = follows prompt more aggressively but can over-saturate. Set to 1.0 to disable CFG (skips the uncond pass - twice as fast). Recommended: SD1.5: 7. SDXL: 4-8. Flux Dev: 1 (CFG bypassed in flow models). Z-Image: 1. Schnell/Turbo: 1. Leave empty for the architecture default.", type: "number" },
|
|
cfgScale: { title: "CFG Scale", description: "Classifier-Free Guidance scale. Strength of pushing the cond toward the prompt vs the uncond. Higher = follows prompt more aggressively but can over-saturate. Set to 1.0 to disable CFG (skips the uncond pass - twice as fast). Recommended: SD1.5: 7. SDXL: 4-8. Flux Dev: 1 (CFG bypassed in flow models). Z-Image: 1. Schnell/Turbo: 1. Leave empty for the architecture default.", type: "number" },
|
|
|
clipSkip: { title: "CLIP Skip", description: "Skip the last N layers of CLIP when encoding the prompt. -1 = use the model's recommended default. 2 is the classic anime-model setting. Recommended: -1 (auto). Set to 2 for anime/cartoon SD1.5 fine-tunes. Leave empty for the architecture default.", type: "number" },
|
|
clipSkip: { title: "CLIP Skip", description: "Skip the last N layers of CLIP when encoding the prompt. -1 = use the model's recommended default. 2 is the classic anime-model setting. Recommended: -1 (auto). Set to 2 for anime/cartoon SD1.5 fine-tunes. Leave empty for the architecture default.", type: "number" },
|
|
|
controlImageBase64: { title: "ControlNet Image (base64)", description: "Base64-encoded pre-processed control image. Must match the ControlNet model loaded - Canny edges for canny model, depth map for depth model, etc. sd.cpp does not pre-process; you do that client-side. Recommended: Required when using ControlNet. Leave empty for the architecture default.", type: "string" },
|
|
controlImageBase64: { title: "ControlNet Image (base64)", description: "Base64-encoded pre-processed control image. Must match the ControlNet model loaded - Canny edges for canny model, depth map for depth model, etc. sd.cpp does not pre-process; you do that client-side. Recommended: Required when using ControlNet. Leave empty for the architecture default.", type: "string" },
|
|
@@ -429,6 +429,13 @@ async function execute(config, input, context) {
|
|
|
if (flat.length > 0) {
|
|
if (flat.length > 0) {
|
|
|
body[option.server] = flat;
|
|
body[option.server] = flat;
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if (option.server === 'cache_mode' && value === 'off') {
|
|
|
|
|
+ // The server reads an absent cache_mode as "use the architecture's
|
|
|
|
|
+ // preference" and an empty one as "off". A dropdown cannot express
|
|
|
|
|
+ // both with the same empty string, so "off" is sent as the explicit
|
|
|
|
|
+ // empty the server wants - which is the only way to stop a preset
|
|
|
|
|
+ // that switches caching on.
|
|
|
|
|
+ body.cache_mode = '';
|
|
|
} else {
|
|
} else {
|
|
|
putIfSet(body, option.server, value);
|
|
putIfSet(body, option.server, value);
|
|
|
}
|
|
}
|