Fix the issue where the Prompt Saver node cannot consume filename from another Prompt Saver node #62

This commit is contained in:
Rhys Yang
2024-02-27 03:10:02 +08:00
parent 867f5eb6f1
commit cbf771ff03
+12 -1
View File
@@ -552,7 +552,14 @@ class SDPromptSaver:
output_to_terminal("Saved file: " + str(file))
comments.append(comment)
return {"ui": {"images": results}, "result": (files, file_paths, comments)}
return {
"ui": {"images": results},
"result": (
self.unpack_singleton(files),
self.unpack_singleton(file_paths),
self.unpack_singleton(comments),
),
}
@staticmethod
def calculate_hash(name, hash_type):
@@ -634,6 +641,10 @@ class SDPromptSaver:
return ""
@staticmethod
def unpack_singleton(arr: list):
return arr[0] if len(arr) == 1 else arr
class SDParameterGenerator:
ASPECT_RATIO_MAP = {