{#if open}
{running ? "Inpainting…" : "Inpaint"}{filename ? ` — ${filename}` : ""}{width && height ? ` · ${width}×${height}` : ""}
{#if !running}
{/if}
{ if (!running) activeTab = "mask"; }}>Mask
{ activeTab = "output"; }}>Output
{#if activeTab === "mask"}
Opacity
Brush
{ eraser = false; }}>
{ eraser = true; }}>
Clear
Fit
{:else}
Fit
Compare
{/if}
{ cursorOver = true; }} onpointerleave={() => { cursorOver = false; }} onwheel={onWheel} oncontextmenu={(e) => e.preventDefault()} ondragstart={(e) => e.preventDefault()} onselectstart={(e) => e.preventDefault()} >
{#if activeTab === "mask" && cursorOver}
{/if} {#if activeTab === "output"} {#if running && progress?.previewUrl}
{:else if outputUrl}
{#if compareSplit}
Before
After
{/if} {:else}
{running ? "Waiting for the sampler…" : "No output yet — paint a mask and Apply."}
{/if} {#if running}
{#if progressPercent != null}
step {progress.value}/{progress.max}
{/if}
{/if} {/if}
{#if savedSetup && !running}
↩ Restore last setup
{/if} {#if caps?.engineModels?.length}
Engine
pickEngine(v)} /> {#if engineKind === "sdxl"}
renders the painted region with this checkpoint — no render metadata needed, and PuLID / Style Reference work on any source
{:else if engineKind === "flux1"}
re-renders the painted region with this FLUX.1 model at the denoise below — describe the content, strong on faces and eyes
{:else if engineKind === "krea2"}
re-renders the painted region with this Krea 2 model at the denoise below — describe the content, sharp detail and clean structure
{:else if engineKind === "qwen"}
follows your instruction inside the mask only — unmasked pixels stay untouched; the region renders at full model resolution
{/if} {#if realismAvailable}
Realism — abliterated encoder + realism/bypass LoRAs (NSFW-capable)
{/if}
{/if} {#if caps?.conditions && engineKind !== "qwen" && engineKind !== "flux1" && engineKind !== "krea2"}
Condition
pickCondition(e.currentTarget.value)} disabled={installing || running}>
Inpaint
Inpaint + PuLID
Inpaint + Style Reference
{#if installing}
Installing pack…
{:else if needsReference}
refInputEl?.click()}>Choose image
{#if refThumbUrl}
{:else}
this image (default)
{/if}
Strength
{ conditionWeight = v; }} />
{ conditionAdvancedOpen = !conditionAdvancedOpen; }}> {conditionAdvancedOpen ? "▾" : "▸"} Advanced
{#if conditionAdvancedOpen} {#if condition === "ipadapter"}
Weight type
{#each IPA_WEIGHT_TYPES as wt}
{wt}
{/each}
Start
{ ipaStartAt = v; }} />
End
{ ipaEndAt = v; }} />
{:else}
Fidelity
{ pulidFidelity = v; }} />
Start
{ pulidStartAt = v; }} />
End
{ pulidEndAt = v; }} />
{/if} {/if} {/if}
{/if} {#if showModeRows}
Mode
pickModeKey(e.currentTarget.value)}> {#each MODE_ROWS as row}
{row.label}
{/each}
{modeOk(currentModeRow) ? currentModeRow.desc : modeReason(currentModeRow)}
{/if}
{engineKind === "qwen" ? "Instruction" : "Prompt"}
{#if regionPrompts.length && engineKind !== "qwen" && !movedContent && (!showModeRows || !isRegionalMode)} {#if forcedPrefill && forcedPrefillLabel && !showModeRows}
🧍 auto-loaded {forcedPrefillLabel}'s prompt — switch below or edit
{/if}
{#each regionPrompts.filter((r) => r.text) as r (r.name)}
applyRegionPrompt(r)} title={r.text.slice(0, 400)}>🧍 {r.name}
{/each}
{/if} {#key promptSeedKey + ":" + promptRestoreNonce} {#if mountPromptEditor}
{:else}
{/if} {/key} {#if referencePrompt && engineKind !== "qwen"}
Workflow prompt (reference)
{referencePrompt}
{/if}
Settings
{#if engineKind !== "qwen"}
Denoise
{ denoise = v; }} />
{/if} {#if caps?.samplerOptions?.length}
Sampler
{#each caps.samplerOptions as opt}
{opt}{opt === recSampler ? " ●" : ""}
{/each}
Scheduler
{#each caps.schedulerOptions as opt}
{opt}{opt === recScheduler ? " ●" : ""}
{/each}
{/if}
{ maskAdvancedOpen = !maskAdvancedOpen; }}> {maskAdvancedOpen ? "▾" : "▸"} Advanced
{#if maskAdvancedOpen}
Grow
{ grow = v; }} />
Feather
{ feather = v; }} />
Steps
{ steps = v; }} />
CFG
{ cfg = v; }} />
Pre-filled with this engine's recipe (Turbo 8/1.0 · RAW 30/3.5 · SDXL 25/5). On the source model, 0 = inherit the image's own.
{/if} {#if !onUseInEdit}
Save to
{ savePrefix = v; }} {fetchApi} /> {/if}
{#if errorMsg}
⚠ {errorMsg}
{/if}
{/if}