ComfyUI: negate clip_skip placeholder value

This commit is contained in:
Cohee
2024-12-28 16:05:58 +02:00
parent d8b738d73e
commit c3ad87cea1

View File

@@ -3310,7 +3310,6 @@ async function generateComfyImage(prompt, negativePrompt, signal) {
'scale',
'width',
'height',
'clip_skip',
];
const workflowResponse = await fetch('/api/sd/comfy/workflow', {
@@ -3333,6 +3332,9 @@ async function generateComfyImage(prompt, negativePrompt, signal) {
const denoising_strength = extension_settings.sd.denoising_strength === undefined ? 1.0 : extension_settings.sd.denoising_strength;
workflow = workflow.replaceAll('"%denoise%"', JSON.stringify(denoising_strength));
const clip_skip = isNaN(extension_settings.sd.clip_skip) ? -1 : -extension_settings.sd.clip_skip;
workflow = workflow.replaceAll('"%clip_skip%"', JSON.stringify(clip_skip));
placeholders.forEach(ph => {
workflow = workflow.replaceAll(`"%${ph}%"`, JSON.stringify(extension_settings.sd[ph]));
});