File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -136,12 +136,13 @@ class UpscaleParams:
136
136
137
137
def run_upscalers_blend (params : List [UpscaleParams ], image : Image .Image , info : str ) -> Tuple [Image .Image , str ]:
138
138
blended_result : Image .Image = None
139
+ image_hash : str = hash (np .array (image .getdata ()).tobytes ())
139
140
for upscaler in params :
140
141
upscale_args = (upscaler .upscaler_idx , upscaling_resize , resize_mode ,
141
142
upscaling_resize_w , upscaling_resize_h , upscaling_crop )
142
- cache_key = LruCache .Key (image_hash = hash ( np . array ( image . getdata ()). tobytes ()) ,
143
+ cache_key = LruCache .Key (image_hash = image_hash ,
143
144
info_hash = hash (info ),
144
- args_hash = hash (( upscale_args , upscale_first ) ))
145
+ args_hash = hash (upscale_args ))
145
146
cached_entry = cached_images .get (cache_key )
146
147
if cached_entry is None :
147
148
res = upscale (image , * upscale_args )
You can’t perform that action at this time.
0 commit comments