Skip to content
swedishembeddedPublic
forked from Comfy-Org/ComfyUI

About

Visual workflow composition and execution

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

5,815 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loom

A visual node-graph interface for building and running AI workflows, purpose-built to drive brain — Swedish Embedded's from-scratch Rust + WGSL model training/inference engine — through its whale command-line binary. Loom is a fork of ComfyUI; it keeps ComfyUI's node-graph engine, execution model, and general-purpose node library, and adds a first-class Whale/<Modality>/<Group> node category wired to the model catalog whale reports.

What's different from upstream ComfyUI

  • loom_brain/ talks to whale as a subprocess (never in-process, never over the network) — spawning whale run, parsing its JSONL workflow-protocol event stream, and bridging progress/completion/ cancellation back into Loom's normal node-execution UI.
  • Curated nodes exist for brain's higher-value model families — chat LMs, VLMs, image/video/audio generation, ASR, perception/restoration — each wired to the model's real parameters (verified against brain's own caps.rs for every crate, never assumed from a name alone).
  • A generic fallback covers everything else: loom_brain/nodes_brain.py turns a real whale describe-catalog run into a node for any brain action that doesn't have a curated node yet, so brain's full ~70-model catalog is reachable from Loom without hand-writing a node per model. CURATED_OVERRIDES is the single list that keeps a curated node and the generic generator from ever colliding on the same model+action.
  • Two sample workflows under user/default/workflows/ show the pattern end to end: video_ltx2_5_t2v.json and video_ltx2_3_t2v.json.

Everything else — the node graph canvas, queueing, subgraphs, workflow templates, custom-node support, the frontend — is upstream ComfyUI, unmodified except where noted in-file.

Features

  • A visual node graph for building and reusing image, video, audio, 3D, and text workflows without code.
  • Reusable subgraphs, workflow templates, and a local API for integrating workflows into applications.
  • Efficient local execution with asynchronous queueing, partial graph re-execution, smart VRAM/RAM management, model offloading, and support for quantized models.
  • Broad native model support via ComfyUI's own node library, alongside brain's catalog through the Whale/... category.
  • Load complete checkpoints or separate diffusion models, VAEs, text encoders, LoRAs, ControlNets, adapters, and upscalers from supported model formats.
  • Built-in tools for inpainting, outpainting, reference conditioning, masks and compositing, model merging, upscaling, frame interpolation, segmentation, depth estimation, and media processing.
  • Save and load workflows as JSON, or recover complete workflows and seeds from supported generated media.
  • Runs fully offline: core does not make outbound network requests unless you explicitly request a model download.
  • Extend with custom nodes; configure additional model locations with extra_model_paths.yaml.

Installing

Python 3.13 is well supported; 3.14 works but some custom nodes may have issues. torch 2.7+ is required; using the latest major version with the latest CUDA release is recommended unless it's less than two weeks old.

git clone <this repo>
cd loom
pip install -r requirements.txt

Put SD checkpoints in models/checkpoints, VAEs in models/vae. Loom itself needs no model files — it drives brain's own model store through whale.

GPU backend (PyTorch)

NVIDIA:

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130

If you hit "Torch not compiled with CUDA enabled", pip uninstall torch and reinstall with the command above.

AMD (Linux, ROCm):

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm7.2

Experimental Windows/Linux builds exist per RDNA generation — see torch's own ROCm nightly index for gfx110X/gfx1151/gfx120X.

Intel (Windows/Linux):

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu

Apple Silicon: install the PyTorch nightly per Apple's Metal PyTorch guide, then follow the manual install steps above.

Ascend NPUs / Cambricon MLUs / Iluvatar Corex: each vendor's PyTorch extension (torch_npu, torch_mlu, ...) needs its own toolkit installed first — see the vendor's own installation docs, then run python main.py as usual.

Custom node manager

pip install -r manager_requirements.txt
python main.py --enable-manager

--enable-manager-legacy-ui uses the legacy manager UI; --disable-manager-ui keeps background features (security checks, scheduled installs) without exposing the manager UI/endpoints.

Running

python main.py

AMD cards not officially supported by ROCm may need HSA_OVERRIDE_GFX_VERSION set before launch (10.3.0 for RDNA2/older, 11.0.0 for RDNA3) — see python main.py --help for the full flag list.

Shortcuts

Keybind Explanation
Ctrl + Enter Queue up current graph for generation
Ctrl + Shift + Enter Queue up current graph as first for generation
Ctrl + Alt + Enter Cancel current generation
Ctrl + Z/Ctrl + Y Undo/Redo
Ctrl + S Save workflow
Ctrl + O Load workflow
Ctrl + A Select all nodes
Alt + C Collapse/uncollapse selected nodes
Ctrl + M Mute/unmute selected nodes
Ctrl + B Bypass selected nodes (acts like the node was removed from the graph and the wires reconnected through)
Delete/Backspace Delete selected nodes
Ctrl + Backspace Delete the current graph
Space Move the canvas around when held and moving the cursor
Ctrl/Shift + Click Add clicked node to selection
Ctrl + C/Ctrl + V Copy and paste selected nodes (without maintaining connections to outputs of unselected nodes)
Ctrl + C/Ctrl + Shift + V Copy and paste selected nodes (maintaining connections from outputs of unselected nodes to inputs of pasted nodes)
Shift + Drag Move multiple selected nodes at the same time
Ctrl + D Load default graph
Alt + + Canvas Zoom in
Alt + - Canvas Zoom out
Ctrl + Shift + LMB + Vertical drag Canvas Zoom in/out
P Pin/Unpin selected nodes
Ctrl + G Group selected nodes
Q Toggle visibility of the queue
H Toggle visibility of history
R Refresh graph
F Show/Hide menu
. Fit view to selection (Whole graph when nothing is selected)
Double-Click LMB Open node quick search palette
Shift + Drag Move multiple wires at once
Ctrl + Alt + LMB Disconnect all wires from clicked slot

Ctrl can also be replaced with Cmd instead for macOS users.

Notes

Only parts of the graph that have an output with all the correct inputs will be executed. Only parts that change from one execution to the next will be re-executed — submit the same graph twice and only the first run actually executes.

Dragging a generated PNG onto the page (or loading one) restores the full workflow, including seeds, that produced it.

(word:1.2)/(word:0.8) adjusts emphasis (default 1.1); escape literal parens as \(/\). {wild|card|test} is a dynamic-prompt wildcard, randomly resolved per queue; escape literal braces as \{/\}. Dynamic prompts also support // comment and /* comment */.

Textual-inversion embeddings go in models/embeddings and are referenced in a CLIPTextEncode prompt as embedding:embedding_filename (extension optional).

High-quality previews

--preview-method auto enables previews. The default is a fast, low-resolution latent preview; for higher quality, download TAESD's decoder weights into models/vae_approx and launch with --preview-method taesd.

TLS/SSL

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes \
  -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"
python main.py --tls-keyfile key.pem --tls-certfile cert.pem

Frontend

The frontend is consumed as the upstream comfyui-frontend-package PyPI dependency (pinned in requirements.txt), not forked. Override the version at launch with --front-end-version <owner>/<repo>@<version-or-latest> if you need to pin or test a different release.

License

GPL-3.0-only, inherited from upstream ComfyUI (see LICENSE). loom_brain/ carries its own SPDX headers per-file.

About

Visual workflow composition and execution

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages