mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes bug with unused parser
This commit is contained in:
parent
f06f69a81a
commit
cae0579ba9
@ -151,17 +151,12 @@ def handle_request_capabilities():
|
||||
@socketio.on("requestAllImages")
|
||||
def handle_request_all_images():
|
||||
print(f">> All images requested")
|
||||
parser = create_cmd_parser()
|
||||
paths = list(filter(os.path.isfile, glob.glob(result_path + "*.png")))
|
||||
paths.sort(key=lambda x: os.path.getmtime(x))
|
||||
image_array = []
|
||||
for path in paths:
|
||||
# image = Image.open(path)
|
||||
all_metadata = retrieve_metadata(path)
|
||||
if "Dream" in all_metadata and not all_metadata["sd-metadata"]:
|
||||
metadata = vars(parser.parse_args(shlex.split(all_metadata["Dream"])))
|
||||
else:
|
||||
metadata = all_metadata["sd-metadata"]
|
||||
metadata = retrieve_metadata(path)
|
||||
image_array.append({"url": path, "metadata": metadata})
|
||||
socketio.emit("galleryImages", {"images": image_array})
|
||||
eventlet.sleep(0)
|
||||
|
Loading…
Reference in New Issue
Block a user