This commit is contained in:
WebDev9000
2023-11-26 15:02:12 -08:00
commit 26ea8e93ee
6 changed files with 102 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
__pycache__
+20
View File
@@ -0,0 +1,20 @@
class IgnoreBraces:
def __init__(self, ):
pass
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"text": ("STRING", {"multiline": True, "dynamicPrompts": False}),
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("text",)
OUTPUT_NODE = True
FUNCTION = "text"
CATEGORY = "WebDev9000"
def text(self, text):
return (text,)
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 WebDev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+18
View File
@@ -0,0 +1,18 @@
# WebDev9000 Nodes
A few misc nodes I've created for various needs.
## IgnoreBrace
A string input node that disables "dynamic prompts", thereby allowing unescaped braces { } in your prompts.
Created to fix an issue loading LoRA with braces in their names via [ComfyUI Prompt Control](https://github.com/asagi4/comfyui-prompt-control).<br />
Without disabling dynamic prompts, braces in the filename are otherwise incompatible even when escaped.
## SettingsSwitch
A node I made to switch between two sets of settings I use often in a high-res pass.
Plug it into Steps and Denoise on a KSampler node to quickly toggle between two presets. <br />
Low denoise = steps: 5, denoise: 0.35<br />
High denoise = steps: 10, denoise: 0.5
+28
View File
@@ -0,0 +1,28 @@
class SettingsSwitch:
def __init__(self, ):
pass
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"preset": (["low noise", "high noise"],),
}
}
RETURN_TYPES = ("INT","FLOAT")
RETURN_NAMES = ("steps","denoise")
OUTPUT_NODE = True
FUNCTION = "doit"
CATEGORY = "WebDev9000"
def doit(self, preset):
if (preset == "low noise"):
steps = 5
denoise = 0.35
else:
steps = 10
denoise = 0.5
return (steps, denoise)
+14
View File
@@ -0,0 +1,14 @@
from .IgnoreBraces import IgnoreBraces
from .SettingsSwitch import SettingsSwitch
NODE_CLASS_MAPPINGS = {
"IgnoreBraces": IgnoreBraces,
"SettingsSwitch": SettingsSwitch,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"IgnoreBraces": "Ignore Braces",
"SettingsSwitch": "Settings Switch",
}
__all__ = [NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS]