ComfyUI: negate clip_skip placeholder value

c3ad87cea1b2eab999d632a2e14e1816ed931c71

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -1Showing whitespace changes
public/scripts/extensions/stable-diffusion/index.js+3 -1
@@ -3310,7 +3310,6 @@ async function generateComfyImage(prompt, negativePrompt, signal) {
33103310 'scale',
33113311 'width',
33123312 'height',
3313- 'clip_skip',
33143313 ];
33153314
33163315 const workflowResponse = await fetch('/api/sd/comfy/workflow', {
@@ -3333,6 +3332,9 @@ async function generateComfyImage(prompt, negativePrompt, signal) {
33333332 const denoising_strength = extension_settings.sd.denoising_strength === undefined ? 1.0 : extension_settings.sd.denoising_strength;
33343333 workflow = workflow.replaceAll('"%denoise%"', JSON.stringify(denoising_strength));
33353334
3335+ const clip_skip = isNaN(extension_settings.sd.clip_skip) ? -1 : -extension_settings.sd.clip_skip;
3336+ workflow = workflow.replaceAll('"%clip_skip%"', JSON.stringify(clip_skip));
3337+
33363338 placeholders.forEach(ph => {
33373339 workflow = workflow.replaceAll(`"%${ph}%"`, JSON.stringify(extension_settings.sd[ph]));
33383340 });