mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
@@ -318,7 +318,6 @@ def control_run(state: str = '', # pylint: disable=keyword-arg-before-vararg
|
||||
# inpaint
|
||||
inpaint_full_res = masking.opts.mask_only,
|
||||
inpainting_mask_invert = 1 if masking.opts.invert else 0,
|
||||
inpainting_fill = 1,
|
||||
# hdr
|
||||
hdr_mode=hdr_mode, hdr_brightness=hdr_brightness, hdr_color=hdr_color, hdr_sharpen=hdr_sharpen, hdr_clamp=hdr_clamp,
|
||||
hdr_boundary=hdr_boundary, hdr_threshold=hdr_threshold, hdr_maximize=hdr_maximize, hdr_max_center=hdr_max_center, hdr_max_boundary=hdr_max_boundary, hdr_color_picker=hdr_color_picker, hdr_tint_ratio=hdr_tint_ratio,
|
||||
|
||||
@@ -261,7 +261,6 @@ class YoloRestorer(Detailer):
|
||||
'styles': [],
|
||||
'inpaint_full_res': True,
|
||||
'inpainting_mask_invert': 0,
|
||||
'inpainting_fill': 1, # no fill
|
||||
'mask_blur': shared.opts.detailer_blur,
|
||||
'inpaint_full_res_padding': shared.opts.detailer_padding,
|
||||
'width': resolution,
|
||||
|
||||
@@ -85,7 +85,7 @@ class StableDiffusionProcessing:
|
||||
mask_for_overlay: Any = None,
|
||||
mask_blur: int = 4,
|
||||
paste_to: Any = None,
|
||||
inpainting_fill: int = 0,
|
||||
inpainting_fill: int = 1, # obsolete
|
||||
inpaint_full_res: bool = False,
|
||||
inpaint_full_res_padding: int = 0,
|
||||
inpainting_mask_invert: int = 0,
|
||||
@@ -483,8 +483,8 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
||||
image = image.crop(crop_region)
|
||||
if image.width != self.width or image.height != self.height:
|
||||
image = images.resize_image(3, image, self.width, self.height, self.resize_name)
|
||||
if self.image_mask is not None and self.inpainting_fill != 1:
|
||||
image = masking.fill(image, latent_mask)
|
||||
# if self.image_mask is not None and self.inpainting_fill != 1:
|
||||
# image = masking.fill(image, latent_mask)
|
||||
if add_color_corrections:
|
||||
self.color_corrections.append(processing_helpers.setup_color_correction(image))
|
||||
processed_images.append(image)
|
||||
|
||||
@@ -104,7 +104,6 @@ class Script(scripts_manager.Script):
|
||||
|
||||
last_image = processed.images[0]
|
||||
p.init_images = [last_image]
|
||||
p.inpainting_fill = 1 # Set "masked content" to "original" for next loop.
|
||||
|
||||
if batch_count == 1:
|
||||
history.append(last_image)
|
||||
|
||||
@@ -126,7 +126,6 @@ class Script(scripts_manager.Script):
|
||||
process_height = p.height
|
||||
p.mask_blur = mask_blur*4
|
||||
p.inpaint_full_res = False
|
||||
p.inpainting_fill = 1
|
||||
p.do_not_save_samples = True
|
||||
p.do_not_save_grid = True
|
||||
left = pixels if "left" in direction else 0
|
||||
|
||||
@@ -22,15 +22,13 @@ class Script(scripts_manager.Script):
|
||||
pixels = gr.Slider(label="Pixels to expand", minimum=8, maximum=256, step=8, value=128, elem_id=self.elem_id("pixels"))
|
||||
mask_blur = gr.Slider(label='Mask blur', minimum=0, maximum=64, step=1, value=4, elem_id=self.elem_id("mask_blur"))
|
||||
with gr.Row():
|
||||
inpainting_fill = gr.Radio(label='Masked content', choices=['fill', 'original', 'latent noise', 'latent nothing'], value='fill', type="index", elem_id=self.elem_id("inpainting_fill"))
|
||||
direction = gr.CheckboxGroup(label="Outpainting direction", choices=['left', 'right', 'up', 'down'], value=['left', 'right', 'up', 'down'], elem_id=self.elem_id("direction"))
|
||||
return [pixels, mask_blur, inpainting_fill, direction]
|
||||
return [pixels, mask_blur, direction]
|
||||
|
||||
def run(self, p, pixels, mask_blur, inpainting_fill, direction): # pylint: disable=arguments-differ
|
||||
def run(self, p, pixels, mask_blur, direction): # pylint: disable=arguments-differ
|
||||
initial_seed = None
|
||||
initial_info = None
|
||||
p.mask_blur = mask_blur * 2
|
||||
p.inpainting_fill = inpainting_fill
|
||||
p.inpaint_full_res = False
|
||||
left = pixels if "left" in direction else 0
|
||||
right = pixels if "right" in direction else 0
|
||||
|
||||
+1
-1
Submodule wiki updated: 5efe329702...14db34d7dc
Reference in New Issue
Block a user