selectable outpaint type separate from inpaint now that i know how _horrible_ original is for outpainting

This commit is contained in:
tim h 2023-01-03 15:52:56 -06:00
parent 09ac7f4111
commit 92f91e23ae
2 changed files with 21 additions and 1 deletions

View file

@ -103,7 +103,8 @@ var stableDiffusionData = {
mask: "", mask: "",
init_images: [], init_images: [],
inpaint_full_res: false, inpaint_full_res: false,
inpainting_fill: 2, inpainting_fill: 1,
outpainting_fill: 2,
enable_hr: false, enable_hr: false,
restore_faces: false, restore_faces: false,
//firstphase_width: 0, //firstphase_width: 0,

View file

@ -927,6 +927,7 @@ const dream_generate_callback = async (bb, resolution, state) => {
request.height request.height
); );
request.mask = maskCanvas.toDataURL(); request.mask = maskCanvas.toDataURL();
request.inpainting_fill = stableDiffusionData.outpainting_fill;
// Dream // Dream
_generate("img2img", request, bb, { _generate("img2img", request, bb, {
@ -1538,6 +1539,23 @@ const dreamTool = () =>
"invisible" "invisible"
); );
// outpaint fill type select list
state.ctxmenu.outpaintTypeSelect = _toolbar_input.selectlist(
state,
"outpainting_fill",
"Outpaint Type",
{
0: "fill",
1: "original (AVOID)",
2: "latent noise (suggested)",
3: "latent nothing",
},
2, // AVOID ORIGINAL FOR OUTPAINT OR ELSE but we still give you the option because we love you
() => {
stableDiffusionData.outpainting_fill = state.outpainting_fill;
}
).label;
// Preserve Brushed Masks Checkbox // Preserve Brushed Masks Checkbox
state.ctxmenu.preserveMasksLabel = _toolbar_input.checkbox( state.ctxmenu.preserveMasksLabel = _toolbar_input.checkbox(
state, state,
@ -1587,6 +1605,7 @@ const dreamTool = () =>
// menu.appendChild(state.ctxmenu.keepUnmaskedBlurSliderLinebreak); // menu.appendChild(state.ctxmenu.keepUnmaskedBlurSliderLinebreak);
// menu.appendChild(state.ctxmenu.preserveMasksLabel); // menu.appendChild(state.ctxmenu.preserveMasksLabel);
// menu.appendChild(document.createElement("br")); // menu.appendChild(document.createElement("br"));
menu.appendChild(state.ctxmenu.outpaintTypeSelect);
menu.appendChild(state.ctxmenu.overMaskPxLabel); menu.appendChild(state.ctxmenu.overMaskPxLabel);
menu.appendChild(state.ctxmenu.eagerGenerateCountLabel); menu.appendChild(state.ctxmenu.eagerGenerateCountLabel);
}, },