ComfyDL
DeepLearning is just a few clicks away!
Nodes (80)

What's This?
ComfyDL lets you build deep learning workflows — from CNNs to BERT and beyond — by connecting nodes in ComfyUI, not by writing code. Built on a foundation inspired by the d2l codebase, it keeps evolving as we develop more useful nodes — visual, educational, and great for rapid prototyping. Drag, connect, and see results instantly.
Examples in Action
A few screenshots of real ComfyDL workflows. Click to enlarge.
RNN Language Model
Build and query a character/word-level RNN language model end-to-end without writing code.

Linear Regression
Generate synthetic data, fit a linear regression, and visualize prediction and residual distributions with histograms.

LeNet Inference
Load a LeNet-style model, run a forward pass, and display class probabilities as a bar chart.

Fashion-MNIST Exploration
Browse the Fashion-MNIST dataset and preview image batches directly in the node graph.

Iteration Timer Benchmark
Benchmark tensor operations (e.g. sqrt) and inspect the timing report.

Lots of Nodes
A bird's-eye view of many ComfyDL nodes wired together.

The Mysterious "?"
A tiny node with a toggle that does... something. Try it and see.

Installation
This project requires ComfyUI. If you don't have it, download from: https://github.com/Comfy-Org/ComfyUI
-
Navigate to your
<img src="./assets/1.png" alt="custom_nodes folder location" width="400" />custom_nodesfolder: -
Clone this repository:
git clone https://github.com/Cynthia-lxx/ComfyDL ./ComfyDL -
Install dependencies:
pip install -r ./ComfyDL/requirements.txt -
Restart ComfyUI. You should see the new ComfyDL nodes appear in the node menu.
Function Overview
ComfyDL provides 106 nodes across 14 categories:
| Category | Count | Description | |---|---|---| | CV Models | 5 | CNN fundamentals & model construction | | Datasets | 10 | Dataset download, load, preview & stats | | Device Utils | 3 | GPU/CPU device utilities | | GAN | 2 | GAN training updates | | Image Tools | 9 | Resize, normalize, flip, rotate, crop, adjust, blur & stats | | Misc | 4 | Windows MessageBox, NoOp pass-through, timing & a mysterious "?" | | Model Utils | 8 | Model info, mode, forward, layers, params, clone & persistence | | NLP Models | 16 | RNN/GRU/RNNLM, attention & Seq2Seq model building blocks | | NLP Utils | 5 | Text tokenization & vocabularies | | ObjectDetection | 10 | Anchor boxes, IoU, NMS | | Segmentation | 4 | VOC semantic segmentation tools | | Tensor Basic | 8 | Tensor I/O, conv, transpose, broadcast, reshape, activation | | TorchOps | 10 | Loss, optimization, metrics | | Visualization | 12 | Plots, charts & bounding box visualization |
For the complete node reference, see FUNCTIONS.md (English) or FUNCTIONS_zh.md (中文).
Repository Layout
ComfyDL/
├── src/d2lcore/ # D2L-inspired core implementation — a reference layer (torch.py, ...)
├── nodes/ # ComfyUI node definitions (thin mapping layer)
│ # incl. self-developed model_utils.py, image_tools.py &
│ # nlp model wrappers (model_nlp.py, model_attention.py, model_seq2seq.py)
└── example_workflows/ # Sample workflow JSONs
Note: A mirror copy of
src/d2lcore/also exists at the repository root asd2lcore/(outside the plugin folder). They must be kept in sync whenever the D2L core logic is modified.
License
This project is licensed under the MIT License — see the LICENSE file for details.
Special Thanks
ComfyDL stands on the shoulders of the incredible d2l (Dive into Deep Learning) community.
- Codebase: We heavily reference and adapt implementations from the
d2l-pytorchrepository. Its clear, textbook-grade code serves as a high-quality reference and starting point for many of our nodes — and continues to guide the development of new ones. We are deeply grateful to all contributors who made this resource available under the permissive MIT-0 license. - Inspiration: The design and pedagogical philosophy behind this project are fundamentally inspired by the book 《Dive into Deep Learning》 (《动手学深度学习》PyTorch版), which offers one of the most accessible and practical paths to mastering deep learning.
This project would not exist without their vision and generosity. We encourage everyone to explore the original book and repository:
- Book (Chinese): https://zh.d2l.ai/
- GitHub Repository: https://github.com/dsgiitr/d2l-pytorch
