Extensions/ComfyDL
ComfyUI Extension

ComfyDL

DeepLearning is just a few clicks away!

By Cynthia-lxx·Created about a month ago·Updated 6 days ago· 4
Cynthia-lxx/ComfyDL
Nodes80
On cloudLocal install
CategoryComfyDL/TorchOps, ComfyDL/Tensor Basic
Stars4
Updated6 days ago

Nodes (80)

Accuracy
ComfyDL/TorchOps
Activation
ComfyDL/Tensor Basic
Area Chart
ComfyDL/Visualization
Assign Anchor→BBox
ComfyDL/ObjectDetection
Bar Chart
ComfyDL/Visualization
BLEU Score
ComfyDL/TorchOps
Box Center→Corner
ComfyDL/ObjectDetection
Box Corner→Center
ComfyDL/ObjectDetection
Box IoU
ComfyDL/ObjectDetection
Broadcast
ComfyDL/Tensor Basic
Confusion Matrix
ComfyDL/Visualization
Conv2D
ComfyDL/Tensor Basic
Corr2D
ComfyDL/CV Models
Device Info
ComfyDL/Device Utils
Get Tokens & Segments
ComfyDL/NLP Utils
Gradient Clip
ComfyDL/TorchOps
Histogram
ComfyDL/Visualization
Image Adjust
ComfyDL/Image Tools
Image Blur
ComfyDL/Image Tools
Image Crop
ComfyDL/Image Tools
Image Flip
ComfyDL/Image Tools
Image Grayscale
ComfyDL/Image Tools
Image Normalize
ComfyDL/Image Tools
Image Resize
ComfyDL/Image Tools
Image Rotate
ComfyDL/Image Tools
Image Stats
ComfyDL/Image Tools
LeNet
ComfyDL/CV Models
Linear Regression
ComfyDL/TorchOps
Masked Softmax
ComfyDL/TorchOps
MessageBox
ComfyDL/Misc
Model Clone
ComfyDL/Model Utils
Model Forward
ComfyDL/Model Utils
Model Info
ComfyDL/Model Utils
Model Layers
ComfyDL/Model Utils
Model Load
ComfyDL/Model Utils
Model Mode
ComfyDL/Model Utils
Model Params
ComfyDL/Model Utils
Model Save
ComfyDL/Model Utils
Multibox Detection
ComfyDL/ObjectDetection
Multibox Prior
ComfyDL/ObjectDetection
Multibox Target
ComfyDL/ObjectDetection
NMS
ComfyDL/ObjectDetection
NoOp
ComfyDL/Misc
Offset Boxes
ComfyDL/ObjectDetection
Offset Inverse
ComfyDL/ObjectDetection
Pie Chart
ComfyDL/Visualization
Plot
ComfyDL/Visualization
Random Tensor
ComfyDL/Tensor Basic
Reshape
ComfyDL/Tensor Basic
Residual Block
ComfyDL/CV Models
ResNet-18
ComfyDL/CV Models
ResNeXt Block
ComfyDL/CV Models
Scatter
ComfyDL/Visualization
Sequence Mask
ComfyDL/TorchOps
SGD Step
ComfyDL/TorchOps
Show BBoxes
ComfyDL/Visualization
Show Heatmaps
ComfyDL/Visualization
Show Heatmaps (Output)
ComfyDL/Visualization
Show Images
ComfyDL/Visualization
Show Trace 2D
ComfyDL/Visualization
Squared Loss
ComfyDL/TorchOps
String → Tensor
ComfyDL/Tensor Basic
Synthetic Data
ComfyDL/TorchOps
Tensor → String
ComfyDL/Tensor Basic
Timer (Benchmark)
ComfyDL/Misc
Tokenize
ComfyDL/NLP Utils
Transpose
ComfyDL/Tensor Basic
Truncate/Pad
ComfyDL/TorchOps
Try All GPUs
ComfyDL/Device Utils
Try GPU
ComfyDL/Device Utils
Update Discriminator
ComfyDL/GAN
Update Generator
ComfyDL/GAN
Vocab Build
ComfyDL/NLP Utils
Vocab Decode
ComfyDL/NLP Utils
Vocab Encode
ComfyDL/NLP Utils
VOC Classes
ComfyDL/Segmentation
VOC Colormap→Label
ComfyDL/Segmentation
VOC Label Indices
ComfyDL/Segmentation
VOC Random Crop
ComfyDL/Segmentation
?
ComfyDL/Misc
Readme

Banner

<div align="center"> <h1>ComfyDL</h1> <p>DeepLearning is just a few clicks away!</p> </div> [中文版本 / Chinese](./README_zh.md)

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.

RNN Language Model

Linear Regression

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

Linear Regression

LeNet Inference

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

LeNet Inference

Fashion-MNIST Exploration

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

Fashion-MNIST Exploration

Iteration Timer Benchmark

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

Iteration Timer Benchmark

Lots of Nodes

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

Lots of Nodes

The Mysterious "?"

A tiny node with a toggle that does... something. Try it and see.

The Mysterious ?


Installation

This project requires ComfyUI. If you don't have it, download from: https://github.com/Comfy-Org/ComfyUI

  1. Navigate to your custom_nodes folder:

    <img src="./assets/1.png" alt="custom_nodes folder location" width="400" />
  2. Clone this repository:

    git clone https://github.com/Cynthia-lxx/ComfyDL ./ComfyDL
    
  3. Install dependencies:

    pip install -r ./ComfyDL/requirements.txt
    
  4. 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 as d2lcore/ (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-pytorch repository. 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

Meow~