Stable Diffusion: reference image visibility + editor placeholder - Show %reference_image% in the ComfyUI workflow editor placeholder list (with found/not-found highlight like the built-in placeholders). - Toast + console log which library image was selected for a generation; warn when the placeholder is present but the library is off/empty. - Redact base64 image payloads (avatars, reference images) from the workflow debug log instead of dumping megabytes of private image data into the browser console.

83ea71cc99bf09a7e1b8d9446db4a17eb8f6f4ee

permissionBRICK <40219477+permissionBRICK@users.noreply.github.com>

2 files changed, +9 -1Ignore whitespace
public/scripts/extensions/stable-diffusion/comfyWorkflowEditor.html+1 -0
@@ -23,6 +23,7 @@
2323 <li data-placeholder="height" class="sd_comfy_workflow_editor_not_found">"%height%"</li>
2424 <li data-placeholder="user_avatar" class="sd_comfy_workflow_editor_not_found">"%user_avatar%"</li>
2525 <li data-placeholder="char_avatar" class="sd_comfy_workflow_editor_not_found">"%char_avatar%"</li>
26+ <li data-placeholder="reference_image" class="sd_comfy_workflow_editor_not_found" title="Best-fitting image from the Reference Image Library, selected by the image-prompt LLM">"%reference_image%"</li>
2627 <li><hr></li>
2728 <li data-placeholder="seed" class="sd_comfy_workflow_editor_not_found">
2829 "%seed%"
public/scripts/extensions/stable-diffusion/index.js+8 -1
@@ -5252,11 +5252,18 @@ async function generateComfyImageCommon(prompt, negativePrompt, signal, basePath
52525252 if (REFERENCE_IMAGE_PLACEHOLDER.test(workflow)) {
52535253 const refImage = await resolveReferenceImageForGeneration(prompt);
52545254 const refBase64 = (refImage && await fetchReferenceImageBase64(refImage)) || PNG_PIXEL;
5255+ if (refBase64 !== PNG_PIXEL) {
5256+ console.log(`SD: workflow reference image: "${refImage.tag}" (${refImage.path})`);
5257+ toastr.info(`Reference image: ${refImage.tag || refImage.path}`, 'Image Generation');
5258+ } else {
5259+ console.warn('SD: workflow uses %reference_image% but no library image was available; sending a transparent pixel');
5260+ }
52555261 workflow = workflow.replaceAll('"%reference_image%"', JSON.stringify(refBase64));
52565262 workflow = workflow.replaceAll('"%reference-image%"', JSON.stringify(refBase64));
52575263 }
5264+ // Log the workflow with base64 image payloads redacted (avatars/reference images are private).
52585265 console.log(`{
5259- "prompt": ${workflow}
5266+ "prompt": ${workflow.replace(/"[A-Za-z0-9+/=]{200,}"/g, '"<base64 image redacted>"')}
52605267 }`);
52615268 const promptResult = await fetch(`${basePath}/generate`, {
52625269 method: 'POST',