diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-17 06:26:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 06:26:26 +0000 |
commit | 85232a5b26666854deae59cf950f744740dd5c37 (patch) | |
tree | 3af76d8c6ba3173ffd925336d902da058df4e02d /scripts/outpainting_mk_2.py | |
parent | 56a2672831751480f94a018f861f0143a8234ae8 (diff) | |
parent | 4b07f2f584596604c4499efb0b0295e96985080f (diff) | |
download | stable-diffusion-webui-gfx803-85232a5b26666854deae59cf950f744740dd5c37.tar.gz stable-diffusion-webui-gfx803-85232a5b26666854deae59cf950f744740dd5c37.tar.bz2 stable-diffusion-webui-gfx803-85232a5b26666854deae59cf950f744740dd5c37.zip |
Merge branch 'dev' into taesd-a
Diffstat (limited to 'scripts/outpainting_mk_2.py')
-rw-r--r-- | scripts/outpainting_mk_2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/outpainting_mk_2.py b/scripts/outpainting_mk_2.py index 670bb8ac..665dbe89 100644 --- a/scripts/outpainting_mk_2.py +++ b/scripts/outpainting_mk_2.py @@ -7,9 +7,9 @@ import modules.scripts as scripts import gradio as gr
from PIL import Image, ImageDraw
-from modules import images, processing, devices
+from modules import images
from modules.processing import Processed, process_images
-from modules.shared import opts, cmd_opts, state
+from modules.shared import opts, state
# this function is taken from https://github.com/parlance-zz/g-diffuser-bot
@@ -72,7 +72,7 @@ def get_matched_noise(_np_src_image, np_mask_rgb, noise_q=1, color_variation=0.0 height = _np_src_image.shape[1]
num_channels = _np_src_image.shape[2]
- np_src_image = _np_src_image[:] * (1. - np_mask_rgb)
+ _np_src_image[:] * (1. - np_mask_rgb)
np_mask_grey = (np.sum(np_mask_rgb, axis=2) / 3.)
img_mask = np_mask_grey > 1e-6
ref_mask = np_mask_grey < 1e-3
|