From 4acf28e485984651e3f82033a609e16d24c13fe3 Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Thu, 24 Apr 2025 20:26:56 +0100 Subject: [PATCH] update path for flux --- lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib.py b/lib.py index 2e277f4..0fde0dd 100644 --- a/lib.py +++ b/lib.py @@ -276,8 +276,8 @@ def get_prompt_from_png(path): with Image.open(path) as img: try: # Flux workflow - meta = img.info.get("parameters").split("Negative")[0] - except AttributeError: + meta = json.loads(img.info["prompt"])['44']['inputs']['text'] + except KeyError: # SDXL workflow meta = json.loads(img.info["prompt"])['6']['inputs']['text'] return meta or ""