From dd28375367fe5a2fbcf6454b0183fb7bcf6e2ec3 Mon Sep 17 00:00:00 2001 From: AIrjen Date: Fri, 4 Aug 2023 21:21:03 +0200 Subject: [PATCH] Renaming and moving stuff around so install can be done easy in ComfyUI --- OneButtonPrompt-node.py => OneButtonPromptNodes.py | 2 +- __init__.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) rename OneButtonPrompt-node.py => OneButtonPromptNodes.py (99%) create mode 100644 __init__.py diff --git a/OneButtonPrompt-node.py b/OneButtonPromptNodes.py similarity index 99% rename from OneButtonPrompt-node.py rename to OneButtonPromptNodes.py index 78f30b5..c0fe8a5 100644 --- a/OneButtonPrompt-node.py +++ b/OneButtonPromptNodes.py @@ -186,7 +186,7 @@ class SavePromptToFile: directoryandfilename = os.path.abspath(os.path.join(output_directory, filenamecomplete)) - with open(directoryandfilename, 'w') as file: + with open(directoryandfilename, 'w', encoding="utf-8") as file: file.write("prompt: " + positive_prompt + "\n") file.write("negative prompt: " + negative_prompt + "\n") diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..206c4c1 --- /dev/null +++ b/__init__.py @@ -0,0 +1,3 @@ +from .OneButtonPromptNodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS + +__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS'] \ No newline at end of file