comfy-org/comfy-cli

comfy-custom-nodes-caching

Packaged fallback for a custom node's cache signature and why it silently recomputes.

Quelltext ansehen

Verwendung

  1. Installationsbefehl kopieren und das Quellpaket vor der Installation in der eigenen Agentenumgebung prüfen.
  2. Benötigte Werkzeuge, Zugangsdaten und Hosts im Original prüfen.
  3. Eingabe und gewünschtes Ergebnis beschreiben und die Ausgabe mit den Quellen abgleichen.
npx skills add https://github.com/comfy-org/comfy-cli --skill comfy-custom-nodes-caching

Vor dem Start

  • Die Installation umfasst weder Modellabo noch API-Kontingent oder Dateizugriffsrechte.
  • Sterne und Installationen zeigen Aktivität, keine unabhängige Qualitäts- oder Sicherheitsprüfung.
Originales Skill-Dokument

Aus dem Quell-Repository gerendert; Überschriften, Beispiele, Code, Tabellen, Links und Bilder bleiben erhalten.

Execution caching fallback

A node declares its cache signature with fingerprint_inputs (V3) or IS_CHANGED (V1). Declaring neither lets the node's declared inputs decide, which is the right default; add one only when the output depends on something those inputs do not capture.

The signature is taken before the graph runs, so a linked input arrives as None — only widget values, literals and the UNIQUE_ID hidden are real. The other hiddens are not: the signature pass calls get_input_data with no dynamic prompt and no extra data, so PROMPT arrives as {} and DYNPROMPT, EXTRA_PNGINFO, EXECUTION_LIST and the auth-token hiddens arrive as None. Fingerprinting one of those yields a constant, which is the stale-output failure this file warns about. The exception is an input declaring rawLink, handed its [node_id, output_index] reference instead. Reaching into a tensor or model through either form raises, and the executor catches that, logs a warning, and makes the signature a not-a-number value that never compares equal to itself. A broken signature therefore shows up as a node that recomputes every run — never as a crash. Return scalars, and lists/tuples/dicts whose keys are all one type, of scalars: a set, a non-str Enum or a dataclass becomes an unhashable sentinel that recomputes every run, and a dict with mixed-type keys raises outside that handler.

The signature is not local: a node's cache key embeds every ancestor's signature, so one value that never repeats forces its whole downstream cone to recompute. A wall-clock reading is the usual cause — correct for a live fetch that must always re-read, a cache defeat for everything after it. Derive the value from what the output depends on: resolved widget values, plus external state the node reads, such as a file's size and modification time — a content digest instead, as core's LoadImage does, when a file may be rewritten in place and leave both unchanged — environment variables, and a version constant bumped when behaviour changes.

Prove both halves: call the signature twice with identical arguments and require equality, then change one field and require a difference. Failing the first is a cache defeat; failing the second is a stale-output bug. Marking a node non-idempotent or as producing intermediate output changes cache behaviour separately and does not substitute for a correct signature.

Verwandte Aufgaben

aus demselben Repository

Weitere Skills

Alle Skills
comfy-org
Community

comfy

Generate images, videos, audio, and 3D via ComfyUI — CLI surface, workflow creation hierarchy (template → fragment → raw JSON), domain gotchas, cloud auth, multi-stage orchestration.

Installationen
2
GitHub Stars
1022
Aktualisiert
20. Okt.
comfy-org
Community

comfy-agent-permissions

Use when a permission blocks the local comfy agent — a folder it cannot read or write, a host a download was refused for, a shell it does not have — to know what the agent may reach by default, how a request is recorded (requestpath, requesthost) and how only the user approves it (the agent panel or the in-chat card), the start-time settings, and what can never be granted.

Installationen
2
GitHub Stars
1022
Aktualisiert
20. Okt.
comfy-org
Community

comfy-build

Build a custom ComfyUI environment on the Comfy developer platform with comfy-cli: turn a local install, a ComfyUI Desktop snapshot, a workflow JSON, or nothing but a Dockerfile, a Modal script or a sentence into a committed comfy-build.yaml and a green release. Use whenever the user wants to package, build, pin, or reproduce a ComfyUI environment, decide the dependency pins before the first cut, or read a failed build's log. Stops at a green release; comfy-deploy takes it from there.

Installationen
2
GitHub Stars
1022
Aktualisiert
20. Okt.
comfy-org
Community

comfy-build-authoring

Reference skill cited by comfy-build. Read it with comfy skills show comfy-build-authoring when authoring a comfy-build.yaml definition by hand — the user has no ComfyUI install to scan, or you are editing a spec's models and customNodes directly. Covers searching the node registry, resolving model filenames to public sources, choosing the directory a weight lands in, and every field of the definition schema.

Installationen
2
GitHub Stars
1022
Aktualisiert
20. Okt.