mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 22:10:14 -03:00
feat(workflow): redirect gen-params updates to connected Primitive nodes (#1026)
When a KSampler marked as 'Send Gen Params Target' has widget inputs wired to Primitive nodes (PrimitiveNode, PrimitiveInt, PrimitiveFloat, etc.), sending gen params from the Lora Manager UI now updates the Primitive node's value instead of the KSampler widget. This is necessary because ComfyUI's execution engine reads from the connected input, ignoring the widget value when a wire is present. Also fix two minor issues found during review: - Remove unnecessary String() wrapping on numeric gen params (seed, steps, cfg) to preserve native types through the JSON/WS path - Correct misleading isNodeEnabled comment: LGraphEventMode values are 0=Always, 2=Never, 4=Bypass (not 'Normal/Enabled')
This commit is contained in:
@@ -254,7 +254,7 @@ function findMatchingWidgets(nodeWidgetNames, resolvedParams) {
|
||||
const candidates = PARAM_TO_WIDGET_CANDIDATES[key] || [key];
|
||||
for (const candidate of candidates) {
|
||||
if (widgetSet.has(candidate.toLowerCase())) {
|
||||
updates.push({ widgetName: candidate, value: String(value) });
|
||||
updates.push({ widgetName: candidate, value });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ function isNodeEnabled(node) {
|
||||
if (!node) {
|
||||
return false;
|
||||
}
|
||||
// ComfyUI node mode: 0 = Normal/Enabled, others = Always/Never/OnEvent
|
||||
// ComfyUI node mode (LGraphEventMode): 0 = Always, 2 = Never, 4 = Bypass
|
||||
return node.mode === undefined || node.mode === 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user