mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-04-28 11:13:41 +01:00
update path for flux
This commit is contained in:
parent
9aea4e63fc
commit
4acf28e485
4
lib.py
4
lib.py
@ -276,8 +276,8 @@ def get_prompt_from_png(path):
|
|||||||
with Image.open(path) as img:
|
with Image.open(path) as img:
|
||||||
try:
|
try:
|
||||||
# Flux workflow
|
# Flux workflow
|
||||||
meta = img.info.get("parameters").split("Negative")[0]
|
meta = json.loads(img.info["prompt"])['44']['inputs']['text']
|
||||||
except AttributeError:
|
except KeyError:
|
||||||
# SDXL workflow
|
# SDXL workflow
|
||||||
meta = json.loads(img.info["prompt"])['6']['inputs']['text']
|
meta = json.loads(img.info["prompt"])['6']['inputs']['text']
|
||||||
return meta or ""
|
return meta or ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user