Skip to content

Commit

Permalink
moving animation nodes and workflows to legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
Suzie1 committed Dec 30, 2023
1 parent c296e24 commit 03be00b
Show file tree
Hide file tree
Showing 17 changed files with 140 additions and 3,372 deletions.
1 change: 1 addition & 0 deletions Patch_Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- updated CR Text List to String, changed inputs to list
- fixed issue on CR Intertwine_Lists
- added CR Maths Operation
- added back CR Prompt Mixer as a legacy node

## v1.55 Dec 29, 2023
- added CR Batch Images From List
Expand Down
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ __📜 List Nodes__
* CR Float Range List (new 25/12/2023)
* CR Integer Range List (new 25/12/2023)
* CR Load Text List (new 27/12/2023)
* Intertwine_Lists (new 29/12/2023)
* Binary To List (new 29/12/2023)
* CR Intertwine_Lists (new 29/12/2023)
* CR Binary To List (new 29/12/2023)
* CR Text List To String (updated 30/12/2023)

__🌟 SDXL__
* CR SDXL Prompt Mix Presets
Expand Down Expand Up @@ -140,23 +141,21 @@ __📉 XY Grid__
* CR XY Save Grid Image
* CR Image Output

__🔢 Index__
__🔢 Utils Index__
* CR Index
* CR Index Increment
* CR Index Multiply
* CR Index Reset
* CR Trigger

__🔧 Conversion__
__🔧 Utils Conversion__
* CR String To Number (changed 18/12/2023)
* CR String To Combo
* CR Float To String
* CR Float To Integer
* CR Integer To String
* CR Text List To String
* CR Seed to Int

__🔀 Logic__
__🔀 Utils Logic__
* CR Image Input Switch
* CR Image Input Switch (4 way)
* CR Latent Input Switch
Expand All @@ -169,29 +168,39 @@ __🔀 Logic__
* CR Text Input Switch (4 way)
* CR Switch Model and CLIP

__🎲 Random__
__🎲 Utils Random__
* CR Random Hex Color
* CR Random RGB
* CR Random Multiline Values (updated 28/12/2023)
* CR Random Multiline Colors (added 28/12/2023)
* CR Random RGB Gradient (new 8/12/2023)
* CR Random Panel Code (new 26/12/2023)

__⚙️ Utils Other__
* CR Integer Multiple
* CR Value
* CR Integer Multiple
* CR Clamp Value (new 29/12/2023)
* CR Set Value On Boolean (new 29/12/2023)
* CR Math Operation (new 31/12/2023)

__📦 Other__
__📦 Other Nodes__
* CR Image Output (changed 18/12/2023)
* CR Latent Batch Size
* CR Prompt Text
* CR Split String
* CR Integer Multiple
* CR Seed
* CR Value
* CR Conditioning Mixer
* CR Select Model
* CR Multiline Text (new 24/12/2023)
* CR Save Text To File (new 27/12/2023)

__Legacy Nodes__
* CR Seed to Int
* CR Aspect Ratio SDXL, replaced by CR SDXL Aspect Ratio
* CR Image Size, replaced by CR Aspect Ratio

__Deleted Nodes__
* CR Aspect Ratio SDXL replaced by CR SDXL Aspect Ratio
* CR SDXL Prompt Mixer replaced by CR SDXL Prompt Mix Presets

# CR Animation Nodes
Expand Down
8 changes: 4 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
from .dev_node_mappings import DEV_NODE_CLASS_MAPPINGS, DEV_NODE_DISPLAY_NAME_MAPPINGS
NODE_CLASS_MAPPINGS = {**DEV_NODE_CLASS_MAPPINGS, **LIVE_NODE_CLASS_MAPPINGS}
NODE_DISPLAY_NAME_MAPPINGS = {**DEV_NODE_DISPLAY_NAME_MAPPINGS, **LIVE_NODE_DISPLAY_NAME_MAPPINGS}
print("\033[34mComfyroll Custom Nodes: \033[92mDev Nodes Loaded\033[0m")
print("\033[34mComfyroll Studio: \033[92mDev Nodes Loaded\033[0m")
else:
NODE_CLASS_MAPPINGS = LIVE_NODE_CLASS_MAPPINGS
NODE_DISPLAY_NAME_MAPPINGS = LIVE_NODE_DISPLAY_NAME_MAPPINGS
except ImportError:
NODE_CLASS_MAPPINGS = LIVE_NODE_CLASS_MAPPINGS
NODE_DISPLAY_NAME_MAPPINGS = LIVE_NODE_DISPLAY_NAME_MAPPINGS

print("------------------------------------------------")
print("\033[34mComfyroll Custom Nodes v1.56 : \033[92m 165 Nodes Loaded\033[0m")
print("------------------------------------------------")
print("------------------------------------------")
print("\033[34mComfyroll Studio v1.56 : \033[92m 165 Nodes Loaded\033[0m")
print("------------------------------------------")

import shutil
import folder_paths
Expand Down
3 changes: 1 addition & 2 deletions animation_nodes/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ def text_list_simple(self, text_1, text_2, text_3, text_4, text_5, text_list_si
return (texts, show_help, )

#---------------------------------------------------------------------------------------------------------------------#
'''
class CR_ImageList:

@classmethod
Expand Down Expand Up @@ -335,7 +334,7 @@ def image_list(self,
show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/List-Nodes#cr-image-list"

return (images, show_help, )
'''
#---------------------------------------------------------------------------------------------------------------------#
class CR_ImageListSimple:

Expand Down
85 changes: 43 additions & 42 deletions live_node_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
from .nodes.nodes_utils_other import *
from .nodes.nodes_legacy import *

from .animation_nodes.interpolation import *
from .animation_nodes.io import *
from .animation_nodes.prompt import *
from .animation_nodes.schedulers import *
from .animation_nodes.schedules import *
from .animation_nodes.lists import *
from .animation_nodes.utils import *
from .animation_nodes.cyclers import *
try:
from .animation_nodes.interpolation import *
from .animation_nodes.io import *
from .animation_nodes.prompt import *
from .animation_nodes.schedulers import *
from .animation_nodes.schedules import *
from .animation_nodes.lists import *
from .animation_nodes.utils import *
from .animation_nodes.cyclers import *
except ImportError:
print("\033[34mComfyroll Studio: \033[92mFailed to load Animation nodes\033[0m")

LIVE_NODE_CLASS_MAPPINGS = {
### Other Nodes
Expand Down Expand Up @@ -62,11 +65,12 @@
### Legacy Nodes
"CR Image Size": CR_ImageSize,
"CR Aspect Ratio SDXL": CR_AspectRatio_SDXL,
"CR SDXL Prompt Mixer": CR_PromptMixer,
"CR Seed to Int": CR_SeedToInt,
### ControlNet Nodes
"CR Apply ControlNet": CR_ApplyControlNet,
"CR Multi-ControlNet Stack": CR_ControlNetStack,
"CR Apply Multi-ControlNet": CR_ApplyControlNetStack,
"CR Apply Multi-ControlNet": CR_ApplyControlNetStack,
### LoRA Nodes
"CR Load LoRA": CR_LoraLoader,
"CR LoRA Stack": CR_LoRAStack,
Expand Down Expand Up @@ -215,29 +219,27 @@
"CR Gradient Integer": CR_GradientInteger,
"CR Increment Float": CR_IncrementFloat,
"CR Increment Integer": CR_IncrementInteger,
"CR Interpolate Latents": CR_InterpolateLatents,
# Lists
"CR Model List": CR_ModelList,
"CR LoRA List": CR_LoRAList,
#"CR Text List": CR_TextList,
"CR Text List Simple": CR_TextListSimple,
#"CR Image List": CR_ImageList,
"CR Image List Simple": CR_ImageListSimple,
# Cyclers
"CR Cycle Models": CR_CycleModels,
"CR Cycle LoRAs": CR_CycleLoRAs,
"CR Cycle Text": CR_CycleText,
"CR Cycle Text Simple": CR_CycleTextSimple,
"CR Cycle Images": CR_CycleImages,
"CR Cycle Images Simple": CR_CycleImagesSimple,
"CR Interpolate Latents": CR_InterpolateLatents,
# Utils
"CR Debatch Frames": CR_DebatchFrames,
"CR Current Frame": CR_CurrentFrame,
#"CR Input Text List": CR_InputTextList,
# IO
"CR Load Animation Frames": CR_LoadAnimationFrames,
"CR Load Flow Frames": CR_LoadFlowFrames,
"CR Output Flow Frames": CR_OutputFlowFrames,
"CR Output Flow Frames": CR_OutputFlowFrames,
### Legacy
"CR Cycle Models": CR_CycleModels,
"CR Cycle LoRAs": CR_CycleLoRAs,
"CR Cycle Text": CR_CycleText,
"CR Cycle Text Simple": CR_CycleTextSimple,
"CR Cycle Images": CR_CycleImages,
"CR Cycle Images Simple": CR_CycleImagesSimple,
"CR Model List": CR_ModelList,
"CR LoRA List": CR_LoRAList,
"CR Text List Simple": CR_TextListSimple,
"CR Image List": CR_ImageList,
"CR Image List Simple": CR_ImageListSimple,
}

LIVE_NODE_DISPLAY_NAME_MAPPINGS = {
Expand Down Expand Up @@ -275,6 +277,7 @@
### Legacy Nodes
"CR Image Size": "CR Image Size (Legacy)",
"CR Aspect Ratio SDXL": "CR Aspect Ratio SDXL (Legacy)",
"CR SDXL Prompt Mixer": "CR SDXL Prompt Mixer (Legacy)",
"CR Seed to Int": "CR Seed to Int (Legacy)",
### ControlNet Nodes
"CR Apply ControlNet": "🕹️ CR Apply ControlNet",
Expand Down Expand Up @@ -427,27 +430,25 @@
"CR Gradient Integer": "🔢 CR Gradient Integer",
"CR Increment Float": "🔢 CR Increment Float",
"CR Increment Integer": "🔢 CR Increment Integer",
"CR Interpolate Latents": "🔢 CR Interpolate Latents",
# Lists
"CR Model List": "📃 CR Model List",
"CR LoRA List": "📃 CR LoRA List",
#"CR Text List": "📃 CR Text List",
"CR Text List Simple": "📃 CR Text List Simple",
#"CR Image List": "📃 CR Image List",
"CR Image List Simple": "📃 CR Image List Simple",
"CR Input Text List": "📃 CR Input Text List",
# Cyclers
"CR Cycle Models": "♻️ CR Cycle Models",
"CR Cycle LoRAs": "♻️ CR Cycle LoRAs",
"CR Cycle Text": "♻️ CR Cycle Text",
"CR Cycle Text Simple": "♻️ CR Cycle Text Simple",
"CR Cycle Images": "♻️ CR Cycle Images",
"CR Cycle Images Simple": "♻️ CR Cycle Images Simple",
"CR Interpolate Latents": "🔢 CR Interpolate Latents",
# Utils
"CR Debatch Frames": "🛠️ CR Debatch Frames",
"CR Current Frame": "🛠️ CR Current Frame",
# IO
"CR Load Animation Frames": "⌨️ CR Load Animation Frames",
"CR Load Flow Frames": "⌨️ CR Load Flow Frames",
"CR Output Flow Frames": "⌨️ CR Output Flow Frames",
"CR Output Flow Frames": "⌨️ CR Output Flow Frames",
### Legacy
"CR Cycle Models": "CR Cycle Models (Legacy)",
"CR Cycle LoRAs": "CR Cycle LoRAs (Legacy)",
"CR Cycle Text": "CR Cycle Text (Legacy)",
"CR Cycle Text Simple": "CR Cycle Text Simple (Legacy)",
"CR Cycle Images": "CR Cycle Images (Legacy)",
"CR Cycle Images Simple": "CR Cycle Images Simple (Legacy)",
"CR Model List": "CR Model List (Legacy)",
"CR LoRA List": "CR LoRA List (Legacy)",
"CR Text List Simple": "CR Text List Simple (Legacy)",
"CR Image List": "CR Image List (Legacy)",
"CR Image List Simple": "CR Image List Simple (Legacy)",
"CR Input Text List": "CR Input Text List (Legacy)",
}
72 changes: 70 additions & 2 deletions nodes/nodes_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def INPUT_TYPES(s):
CATEGORY = icons.get("Comfyroll/Other/Legacy")

def Aspect_Ratio(self, width, height, aspect_ratio, swap_dimensions, upscale_factor1, upscale_factor2, batch_size):

show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Legacy-Nodes#cr-aspect-ratio-sdxl"

if aspect_ratio == "1:1 square 1024x1024":
width, height = 1024, 1024
elif aspect_ratio == "3:4 portrait 896x1152":
Expand All @@ -74,13 +77,77 @@ def Aspect_Ratio(self, width, height, aspect_ratio, swap_dimensions, upscale_fac
elif aspect_ratio == "21:9 landscape 1536x640":
width, height = 1536, 640

show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Legacy-Nodes#cr-aspect-ratio-sdxl"

if swap_dimensions == "On":
return(height, width, upscale_factor1, upscale_factor2, batch_size,show_help,)
else:
return(width, height, upscale_factor1, upscale_factor2, batch_size,show_help,)

#---------------------------------------------------------------------------------------------------------------------------------------------------#
class CR_PromptMixer:
def __init__(self):
pass

@classmethod
def INPUT_TYPES(s):
return {
"required":{
},
"optional":{
"prompt_positive": ("STRING", {"multiline": True, "default": "BASE_POSITIVE"}),
"prompt_negative": ("STRING", {"multiline": True, "default": "BASE_NEGATIVE"}),
"style_positive": ("STRING", {"multiline": True, "default": "REFINER_POSTIVE"}),
"style_negative": ("STRING", {"multiline": True, "default": "REFINER_NEGATIVE"}),
"preset": (["preset 1", "preset 2", "preset 3", "preset 4", "preset 5"],),
},
}

RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING", )
RETURN_NAMES = ("pos_g", "pos_l", "pos_r", "neg_g", "neg_l", "neg_r", )
FUNCTION = "mixer"

CATEGORY = icons.get("Comfyroll/Other/Legacy")

def mixer(self, prompt_positive, prompt_negative, style_positive, style_negative, preset):

show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Legacy-Nodes#cr-prompt-mixer"

if preset == "preset 1":
pos_g = prompt_positive
pos_l = prompt_positive
pos_r = prompt_positive
neg_g = prompt_negative
neg_l = prompt_negative
neg_r = prompt_negative
elif preset == "preset 2":
pos_g = prompt_positive
pos_l = style_positive
pos_r = prompt_positive
neg_g = prompt_negative
neg_l = style_negative
neg_r = prompt_negative
elif preset == "preset 3":
pos_g = style_positive
pos_l = prompt_positive
pos_r = style_positive
neg_g = style_negative
neg_l = prompt_negative
neg_r = style_negative
elif preset == "preset 4":
pos_g = prompt_positive + style_positive
pos_l = prompt_positive + style_positive
pos_r = prompt_positive + style_positive
neg_g = prompt_negative + style_negative
neg_l = prompt_negative + style_negative
neg_r = prompt_negative + style_negative
elif preset == "preset 5":
pos_g = prompt_positive
pos_l = prompt_positive
pos_r = style_positive
neg_g = prompt_negative
neg_l = prompt_negative
neg_r = style_negative
return (pos_g, pos_l, pos_r, neg_g, neg_l, neg_r, )

#---------------------------------------------------------------------------------------------------------------------------------------------------#
class CR_SeedToInt:
def __init__(self):
Expand Down Expand Up @@ -111,6 +178,7 @@ def seed_to_int(self, seed):
NODE_CLASS_MAPPINGS = {
"CR Image Size": CR_ImageSize,
"CR Aspect Ratio SDXL": CR_AspectRatio_SDXL,
"CR SDXL Prompt Mixer": CR_PromptMixer,
"CR Seed to Int": CR_SeedToInt,
}
'''
Expand Down
Loading

0 comments on commit 03be00b

Please sign in to comment.