Hotfix: call processing close to cleanup API generation calls

This commit is contained in:
ramyma 2023-07-02 04:59:59 +03:00
parent fab73f2e7d
commit 74d001bc68
1 changed files with 2 additions and 0 deletions

View File

@ -335,6 +335,7 @@ class Api:
p.script_args = tuple(script_args) # Need to pass args as tuple here p.script_args = tuple(script_args) # Need to pass args as tuple here
processed = process_images(p) processed = process_images(p)
shared.state.end() shared.state.end()
p.close()
b64images = list(map(encode_pil_to_base64, processed.images)) if send_images else [] b64images = list(map(encode_pil_to_base64, processed.images)) if send_images else []
@ -392,6 +393,7 @@ class Api:
p.script_args = tuple(script_args) # Need to pass args as tuple here p.script_args = tuple(script_args) # Need to pass args as tuple here
processed = process_images(p) processed = process_images(p)
shared.state.end() shared.state.end()
p.close()
b64images = list(map(encode_pil_to_base64, processed.images)) if send_images else [] b64images = list(map(encode_pil_to_base64, processed.images)) if send_images else []