Skip to content

Understand generated files

After cwf init or cwf import, you have several files. Only some of them are yours.

FileEdit?Role
package.jsonYes (metadata)npm identity, comfyWorkflow pointer, keywords
comfy.workflow.jsonAfter you mean toManifest: params, outputs, node classes
workflow.ir.jsonNoCanonical Graph IR
workflow.tsOptional yesEmitted TypeScript. Adopt it if you want to own the graph in code.
README.mdYesGenerated scaffolding. Rewrite if you publish.

See What do I edit? for the full table including codegen and locks.

workflow.ir.json

Plain tagged JSON. Safe under ordinary JSON.parse. Slot identity is {node, out}. Template placeholders look like {"$param":"seed"}. Big integers look like {"$int":"18446744073709551615"}.

Do not hand-edit this in a first-party package. If you adopted workflow.ts / ir.build.ts, rebuild IR from TypeScript.

workflow.ts

cwf import --ts and cwf init emit this so you can keep working in the type checker. Classes known to defs but missing from every registry become rawNode(...) so the file always loads.

If you later snapshot your Comfy and run codegen, re-import with --registry <dir> so those classes become typed specs.

comfy.workflow.json

Identity, parameters, outputs, requires.nodeClasses. cwf pack checks this against the IR. A class listed in the IR but missing here (or the reverse) fails the pack.

Portability warnings

cwf init never rewrites behavior. It does tell you about values that make the package machine-specific: checkpoint filenames, absolute paths. Those warnings are the cue to expose parameters.

Released under the MIT License. Unofficial project. Not affiliated with or endorsed by Comfy Org.