diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-06 08:27:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-06 08:27:54 +0000 |
commit | 07d1bd426722b4c53b38ff682c5aab53177d8530 (patch) | |
tree | 4fdad803a4536cec2bd3e622c5f4cfb980f04550 /modules/extras.py | |
parent | 3f3d14afd5abd07d3843370dc1c28be299dbdbab (diff) | |
parent | 6e4de5b4422dfc0d45063b2c8c78b19f00321615 (diff) | |
download | stable-diffusion-webui-gfx803-07d1bd426722b4c53b38ff682c5aab53177d8530.tar.gz stable-diffusion-webui-gfx803-07d1bd426722b4c53b38ff682c5aab53177d8530.tar.bz2 stable-diffusion-webui-gfx803-07d1bd426722b4c53b38ff682c5aab53177d8530.zip |
Merge branch 'master' into roy.add_simple_interrogate_api
Diffstat (limited to 'modules/extras.py')
-rw-r--r-- | modules/extras.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/extras.py b/modules/extras.py index 4d51088b..71b93a06 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -136,10 +136,11 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_ def run_upscalers_blend(params: List[UpscaleParams], image: Image.Image, info: str) -> Tuple[Image.Image, str]:
blended_result: Image.Image = None
+ image_hash: str = hash(np.array(image.getdata()).tobytes())
for upscaler in params:
upscale_args = (upscaler.upscaler_idx, upscaling_resize, resize_mode,
upscaling_resize_w, upscaling_resize_h, upscaling_crop)
- cache_key = LruCache.Key(image_hash=hash(np.array(image.getdata()).tobytes()),
+ cache_key = LruCache.Key(image_hash=image_hash,
info_hash=hash(info),
args_hash=hash(upscale_args))
cached_entry = cached_images.get(cache_key)
|