[Enhancement] workflow set-slot: support toggling node mode (bypass/mute)

Aperta
#721 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
ai, cli

Direzione di ricerca

Inizia con gli entry point esistenti comfy workflow set-slot e slots, quindi leggi workflow_to_api.py per capire come vengono risolti i nodi aggirati o silenziati. Segui l’indirizzamento esistente di instance/inner prima di scegliere tra le interfacce proposte. Il lavoro è completato quando la CLI può impostare un nodo su normal, mute o bypass, preservando l’indirizzamento del sottografo e rimuovendo la necessità dello script workaround.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Motivation

comfy workflow slots / set-slot cover widget values, which makes value-level presets (resolution, steps, checkpoint name) fully scriptable against one canonical frontend-format file. But a very common preset dimension is structural: switching a node on/off — the canonical example being a LoRA loader that a "draft" preset enables and a "finals" preset disables.

The GUI answer is bypass (Ctrl+B, litegraph mode 4) and workflow_to_api.py already resolves bypassed/muted nodes correctly at conversion — the only missing piece is a CLI verb to set the mode.

Setting a LoRA's strength_model=0 is not a substitute: ComfyUI registers zero-strength patches unconditionally (model_patcher.add_patches has no short-circuit), so under weight streaming you still pay the full per-step re-merge for a patch with zero effect. On an 11 GB card we measured that tax at ~20% of a whole render — a silent perf trap that mode toggling avoids.

Proposal

Either of:

  1. Extend the set-slot address space with a pseudo-input, e.g.
    comfy workflow set-slot wf.json '105/200._mode=bypass' (accepting normal|mute|bypass), or
  2. A sibling verb: comfy workflow set-mode wf.json 105/200=bypass.

Subgraph-interior addressing (instance/inner) already exists in slots, so either form composes with it naturally. slots output could also list each node's current mode so agents can discover toggleable structure.

Current workaround

We generate preset variants by running set-slot --stdout for values and then patching node.mode = 4 for a declared bypass: list in a ~40-line script — it works, but it reaches into the file format where everything else goes through the CLI, and we'd happily delete it.

Lingua principale
Python
Stelle
1k
Fork
176
Merge medio
1g 11h
PR unite (30g)
87

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Comfy-Org/comfy-cli

Tutte le issue di Comfy-Org/comfy-cli

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.