Moved .py files to seperate folder, made prompt combine not add seperator to end of string

This commit is contained in:
sn0w12
2024-01-29 13:11:04 +01:00
parent a168e225c7
commit 4d99ba2244
18 changed files with 15 additions and 15 deletions
+7 -7
View File
@@ -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,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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:
+1 -3
View File
@@ -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
+5 -5
View File
@@ -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),)