diff --git a/__init__.py b/__init__.py index df4d2f4..94f9378 100644 --- a/__init__.py +++ b/__init__.py @@ -1,10 +1,10 @@ -from .find_resolution import FindResolutionNode -from .split_string import SplitStringNode -from .lora_selector import LoraSelectorNode -from .lora_tester_xl import LoraTestXLNode -from .lora_tester import LoraTestNode -from .character_select import CharacterSelectNode -from .prompt_combine import CombineStringNode +from .src.find_resolution import FindResolutionNode +from .src.split_string import SplitStringNode +from .src.lora_selector import LoraSelectorNode +from .src.lora_tester_xl import LoraTestXLNode +from .src.lora_tester import LoraTestNode +from .src.character_select import CharacterSelectNode +from .src.prompt_combine import CombineStringNode NODE_CLASS_MAPPINGS = { "Find SDXL Resolution": FindResolutionNode, diff --git a/__pycache__/__init__.cpython-311.pyc b/__pycache__/__init__.cpython-311.pyc index 11cff4e..cc84048 100644 Binary files a/__pycache__/__init__.cpython-311.pyc and b/__pycache__/__init__.cpython-311.pyc differ diff --git a/src/__pycache__/character_select.cpython-311.pyc b/src/__pycache__/character_select.cpython-311.pyc new file mode 100644 index 0000000..9f1698d Binary files /dev/null and b/src/__pycache__/character_select.cpython-311.pyc differ diff --git a/src/__pycache__/find_resolution.cpython-311.pyc b/src/__pycache__/find_resolution.cpython-311.pyc new file mode 100644 index 0000000..96a4aa3 Binary files /dev/null and b/src/__pycache__/find_resolution.cpython-311.pyc differ diff --git a/src/__pycache__/image_batch.cpython-311.pyc b/src/__pycache__/image_batch.cpython-311.pyc new file mode 100644 index 0000000..80f8fc4 Binary files /dev/null and b/src/__pycache__/image_batch.cpython-311.pyc differ diff --git a/src/__pycache__/lora_selector.cpython-311.pyc b/src/__pycache__/lora_selector.cpython-311.pyc new file mode 100644 index 0000000..206df9d Binary files /dev/null and b/src/__pycache__/lora_selector.cpython-311.pyc differ diff --git a/src/__pycache__/lora_tester.cpython-311.pyc b/src/__pycache__/lora_tester.cpython-311.pyc new file mode 100644 index 0000000..07c46c5 Binary files /dev/null and b/src/__pycache__/lora_tester.cpython-311.pyc differ diff --git a/src/__pycache__/lora_tester_xl.cpython-311.pyc b/src/__pycache__/lora_tester_xl.cpython-311.pyc new file mode 100644 index 0000000..180acc4 Binary files /dev/null and b/src/__pycache__/lora_tester_xl.cpython-311.pyc differ diff --git a/src/__pycache__/prompt_combine.cpython-311.pyc b/src/__pycache__/prompt_combine.cpython-311.pyc new file mode 100644 index 0000000..412be1f Binary files /dev/null and b/src/__pycache__/prompt_combine.cpython-311.pyc differ diff --git a/src/__pycache__/split_string.cpython-311.pyc b/src/__pycache__/split_string.cpython-311.pyc new file mode 100644 index 0000000..0b39b91 Binary files /dev/null and b/src/__pycache__/split_string.cpython-311.pyc differ diff --git a/character_select.py b/src/character_select.py similarity index 95% rename from character_select.py rename to src/character_select.py index 63f7382..0ad645b 100644 --- a/character_select.py +++ b/src/character_select.py @@ -6,6 +6,7 @@ class CharacterSelectNode: def INPUT_TYPES(cls): # Get the directory of the current script dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path.replace("\\src", "") # Construct the full path to the JSON file json_path = os.path.join(dir_path, 'characters.json') @@ -31,6 +32,7 @@ class CharacterSelectNode: def find_associated_string(self, character, character_strength, character_pronpt): dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path.replace("\\src", "") json_path = os.path.join(dir_path, 'characters.json') with open(json_path, 'r') as file: diff --git a/find_resolution.py b/src/find_resolution.py similarity index 100% rename from find_resolution.py rename to src/find_resolution.py diff --git a/image_batch.py b/src/image_batch.py similarity index 100% rename from image_batch.py rename to src/image_batch.py diff --git a/lora_selector.py b/src/lora_selector.py similarity index 100% rename from lora_selector.py rename to src/lora_selector.py diff --git a/lora_tester.py b/src/lora_tester.py similarity index 97% rename from lora_tester.py rename to src/lora_tester.py index 8fa3bb8..ddc6060 100644 --- a/lora_tester.py +++ b/src/lora_tester.py @@ -1,8 +1,6 @@ -from PIL import Image -import torch from nodes import KSampler, VAEDecode, VAEEncode, EmptyLatentImage, CLIPTextEncode from custom_nodes.comfyui_lora_tag_loader.nodes import LoraTagLoader -from custom_nodes.was.WAS_Node_Suite import WAS_Image_Batch +from .image_batch import WAS_Image_Batch from comfy_extras.nodes_upscale_model import ImageUpscaleWithModel import comfy.samplers diff --git a/lora_tester_xl.py b/src/lora_tester_xl.py similarity index 100% rename from lora_tester_xl.py rename to src/lora_tester_xl.py diff --git a/prompt_combine.py b/src/prompt_combine.py similarity index 75% rename from prompt_combine.py rename to src/prompt_combine.py index 7a5af68..c44c6d1 100644 --- a/prompt_combine.py +++ b/src/prompt_combine.py @@ -22,10 +22,10 @@ class CombineStringNode: for string in strings: if string: # Skip empty strings - # Add the string to the combined list, appending separator if needed - if not string.endswith(separator): - string += separator + # Remove separator at the end if it exists + if string.endswith(separator): + string = string[:-len(separator)] combined.append(string) - # Join all parts and return as a tuple - return (''.join(combined),) + # Join all parts with the separator and return as a tuple + return (separator.join(combined),) diff --git a/split_string.py b/src/split_string.py similarity index 100% rename from split_string.py rename to src/split_string.py