Power Puter: Pre-set input vars (a-z) to avoid key errors when muting/bypassing. Add better messages for trigger words.
This commit is contained in:
+10
-2
@@ -73,10 +73,18 @@ class RgthreePowerLoraLoader:
|
||||
for lora in loras:
|
||||
info = asyncio.run(get_model_info(lora, 'loras'))
|
||||
if not info or not info.keys():
|
||||
log_node_warn(NODE_NAME, f'No info found for lora {lora} when grabbing triggers.')
|
||||
log_node_warn(
|
||||
NODE_NAME,
|
||||
f'No info found for lora {lora} when grabbing triggers. Have you generated an info file'
|
||||
' from the Power Lora Loader "Show Info" dialog?'
|
||||
)
|
||||
continue
|
||||
if 'trainedWords' not in info or not info['trainedWords']:
|
||||
log_node_warn(NODE_NAME, f'No trained words for lora {lora} when grabbing triggers.')
|
||||
log_node_warn(
|
||||
NODE_NAME,
|
||||
f'No trained words for lora {lora} when grabbing triggers. Have you fetched data from'
|
||||
'civitai or manually added words?'
|
||||
)
|
||||
continue
|
||||
trained_words += [w for wi in info['trainedWords'][:max_each] if (wi and (w := wi['word']))]
|
||||
return trained_words
|
||||
|
||||
+5
-5
@@ -162,11 +162,11 @@ class RgthreePowerPuter:
|
||||
workflow = pnginfo["workflow"] if "workflow" in pnginfo else {"nodes": []}
|
||||
prompt = kwargs['prompt']
|
||||
|
||||
ctx = {**kwargs}
|
||||
del ctx['output']
|
||||
del ctx['code']
|
||||
del ctx['extra_pnginfo']
|
||||
del ctx['prompt']
|
||||
ctx = {}
|
||||
# Set variable names, defaulting to None instead of KeyErrors
|
||||
for c in 'abcdefghijklmnopqrstuvwxyz'.split(''):
|
||||
ctx[c] = kwargs[c] if c in kwargs else None
|
||||
|
||||
|
||||
# Clean the code before evaluating. For now, we just change usage of `input_node` so the passed
|
||||
# variable is a string, if it isn't (instead of `input_node(a)` it's to be `input_node('a')`.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "rgthree-comfy"
|
||||
description = "Making ComfyUI more comfortable."
|
||||
version = "1.0.2505242129"
|
||||
version = "1.0.2505260742"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user