diff options
author | Bruno Seoane <brunoseoaneamarillo@gmail.com> | 2022-11-04 19:40:13 +0000 |
---|---|---|
committer | Bruno Seoane <brunoseoaneamarillo@gmail.com> | 2022-11-04 19:40:13 +0000 |
commit | fd66f669ea25bad1409aec87ef14b8417009bddc (patch) | |
tree | 42348fb16d018920f6d7fc5970f6c54803ba5e72 /modules/extras.py | |
parent | 31db25ecc8d9c3996e7bac00cc616ee12557b7d3 (diff) | |
parent | 89722fb5e4eda2adc5d3a6abf8babf8a58e80d69 (diff) | |
download | stable-diffusion-webui-gfx803-fd66f669ea25bad1409aec87ef14b8417009bddc.tar.gz stable-diffusion-webui-gfx803-fd66f669ea25bad1409aec87ef14b8417009bddc.tar.bz2 stable-diffusion-webui-gfx803-fd66f669ea25bad1409aec87ef14b8417009bddc.zip |
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui
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)
|