Deep learningyou can see inside.

CodefyUI is an open-source, node-based builder for deep learning. Drag layers onto a canvas, wire them into a graph, press Run, then click any node to see the exact numbers that came out of it.

Latest release 2.8.9AGPL-3.0Python, PyTorch and React
StartRun the graph

This graph runs right here.

IdleDraw on the grid, swap the kernel, then click a node to inspect it.
Start
trigger
Data
trigger
tensor
shape1,1,8,8
value_modeexplicit
CNN
tensor
tensor
stride1
padding1
CNN
tensor
tensor
CNN
tensor
tensor
kernel_size2
stride2
Utility
data
image
plot_typeheatmap
This demo runs in plain JavaScript. CodefyUI itself runs every node on PyTorch.

One canvas, from the first layer to a trained model.

The real editor is a browser app served by a single local process. Everything you build is a graph you can save, share and run again.

Every node, by name.

The built-in library spans classical ML, CNNs, sequence models, transformers, LLMs, diffusion, reinforcement learning and vision-language-action models. Each category keeps its colour on the canvas.

152 nodes in 16 categoriesOpen the node reference
  • Start
  • Dataset
  • ImageFolderDataset
  • DataLoader
  • DatasetBatch
  • Transform
  • HuggingFaceDataset
  • KaggleDataset
  • TensorInput
  • TextInput
  • CSVReader
  • ColumnSelector
  • RowSelector
  • Normalize
  • SyntheticDataset
  • SyntheticShapes
  • SyntheticSegmentation
  • SyntheticSequence
  • TrainTestSplit
  • ResizeTransform
  • ToTensorTransform
  • NormalizeTransform
  • RandomCrop
  • RandomHorizontalFlip
  • RandomRotation
  • ColorJitter
  • RandAugment
  • ComposeTransform
  • Map
  • Reduce
  • Switch
  • Conv2d
  • Conv1d
  • Conv2dExplicit
  • ConvTranspose2d
  • MaxPool2d
  • AvgPool2d
  • AdaptiveAvgPool2d
  • BatchNorm2d
  • Dropout
  • Activation
  • LSTM
  • GRU
  • RNNCell
  • MultiHeadAttention
  • TransformerEncoder
  • TransformerDecoder
  • MoELayer
  • LLMChat
  • Tokenizer
  • WordVector
  • TextEmbedding
  • EmbeddingScatter
  • CosineSimilarity
  • AttentionMask
  • AttentionHeatmap
  • PositionalEncoding
  • CausalLMModel
  • LMCrossEntropyLoss
  • LMTokenizer
  • TextCorpusDataset
  • LMTokenizedDataset
  • DataMixDataset
  • PerplexityEvaluate
  • TextGenerate
  • DocumentLoader
  • TextChunker
  • VectorStore
  • Retriever
  • PromptBuilder
  • HFTextGenerate
  • Upsample
  • TimestepEmbedding
  • Lerp
  • GaussianNoise
  • DDPMSampler
  • DiffusionUNet
  • DiffusionTrainingLoop
  • DQN
  • PPO
  • EnvWrapper
  • RewardModel
  • KLDivergence
  • PolicyRollout
  • PPOClipObjective
  • GroupRelativeAdvantage
  • Discount
  • GridWorldEnv
  • PreferenceDataset
  • BradleyTerryLoss
  • BradleyTerryTrain
  • VLAModel
  • VLARollout
  • VLAActionEval
  • PushWorldEnv
  • PushWorldDemos
  • KNN
  • LinearRegression
  • LogisticRegression
  • DecisionTreeClassifier
  • RandomForestClassifier
  • SVMClassifier
  • MLPClassifier
  • Accuracy
  • Optimizer
  • Loss
  • TrainingLoop
  • EvaluateModel
  • LRScheduler
  • SequentialModel
  • BackwardOnce
  • BatchNorm1d
  • LayerNorm
  • GroupNorm
  • InstanceNorm2d
  • Add
  • MatMul
  • Mean
  • Multiply
  • ScalarMultiply
  • Permute
  • Softmax
  • Argmax
  • Split
  • Squeeze
  • Stack
  • TensorCreate
  • Unsqueeze
  • MaskedFill
  • ImageReader
  • ImageWriter
  • ImageBatchReader
  • FileReader
  • CheckpointSaver
  • CheckpointLoader
  • ModelLoader
  • ModelSaver
  • Inference
  • GraphInput
  • GraphOutput
  • VideoLoad
  • VideoWrite
  • Print
  • Reshape
  • Concat
  • Flatten
  • Linear
  • Visualize
  • Embedding
  • PythonScript
  • ScatterPlot2D
  • DecisionBoundary

Made to be taught with.

CodefyUI grew up in the classroom. Plugin packs follow a textbook module by module, and every Edu node breaks one idea into named steps that the Teaching Inspector shows a row at a time.

Teaching Inspector

Record every node’s full output, compare a segment’s head input with its tail output, and turn on verbose internals to see attention scores and other values a layer normally hides.

How the Teaching Inspector works

Edu-ColumnStats

foundations · Classical

Population standard deviation, one step per row. Edit the column and watch each step recompute.

column
  1. sumΣx
  2. divideΣx ÷ n = mean
  3. deviations²(x − mean)²
  4. variancemean of deviations²
  5. sqrt√variance = σ

Plugin packs

  • foundationsI1 Data representation · I2 Classical ML
  • deepI3 Vision · I4 Sequences
  • rlI5 Reinforcement learning
  • eduHands-on labs for I1 and I2
  • statsDescriptive statistics for any dataset
cdui plugin install foundations deep rl

When the graph works, put it to work.

The same graph you sketched in a lesson can run overnight, answer HTTP requests and live in git.

  • Runs belong to the server and queue per device, so closing the tab does not stop them. Sweep one graph over a grid or a random sample of parameters.

    Read more about queue runs and sweeps
  • Freeze a saved graph as a versioned app behind API keys. Every invoke is recorded, and editing the canvas never changes what is published.

    Read more about publish as an api
  • The Source Control tab stages, commits, branches, pulls and pushes a project directory without leaving the editor.

    Read more about keep it in git
  • The ResNet-18 CIFAR-10 example reaches 95.48% test accuracy, and two runs with the same seed match bit for bit.

    Read more about reproduce a baseline
cdui run
# Submit a graph to the server's queue.
# The run keeps going after the terminal closes.
$ cdui run examples/Usage_Example/CNN-MNIST/TrainCNN-MNIST/graph.json

# Run one graph over a grid of parameter values.
$ curl -X POST http://127.0.0.1:8000/api/sweeps \
    -H "X-CodefyUI-Token: $TOKEN" \
    --data "@sweep.json"

Start from a graph that already works.

Example graphs open as tabs. Run one as it is, then take it apart.

Browse the examples gallery

Model architectures

  • ResNetCNN
  • ConvNeXtCNN
  • EfficientNetCNN
  • U-NetCNN
  • ViTTransformer
  • Swin TransformerTransformer
  • BERTLLM
  • GPTLLM
  • LLaMALLM
  • DiTDiffusion
  • LSTM time seriesRNN
  • BiGRU speech recognitionRNN
  • Seq2Seq with attentionRNN
  • DQN AtariRL
  • PPO roboticsRL

Hands-on

  • Train a CNN on MNIST
  • Train ResNet-18 on CIFAR-10
  • king − man + woman ≈ queen
  • Fully local RAG
  • Pretrain an LM on TinyStories
  • Forward diffusion on a digit
  • Mixture-of-experts routing
  • Train a VLA on PushWorld

A new node is one Python file.

Subclass BaseNode, declare ports and parameters, and drop the file into custom_nodes. Reload, and it appears in the library with its own card.

Plugins

Install packs from the Plugin Center or the terminal. Third-party packs come from GitHub, pinned to a commit and checked before they load.

cdui plugin install owner/repo

Graph Copilot, a community plugin, builds and edits graphs through chat with OpenAI, Claude, OpenRouter or a local model.

backend/app/custom_nodes/my_node.pyPython
from app.core.node_base import BaseNode, DataType, PortDefinition


class MyNode(BaseNode):
    NODE_NAME = "MyNode"
    CATEGORY = "Custom"
    DESCRIPTION = "Does something"

    @classmethod
    def define_inputs(cls):
        return [PortDefinition(name="input", data_type=DataType.TENSOR)]

    @classmethod
    def define_outputs(cls):
        return [PortDefinition(name="output", data_type=DataType.TENSOR)]

    def execute(self, inputs, params):
        return {"output": inputs["input"]}

Install in one line.

The installer sets up git, uv and Python, downloads a prebuilt editor and picks a PyTorch build for your GPU. Node.js is not needed.

Runs on CPU, NVIDIA CUDA, Apple Silicon MPS and AMD ROCm.

Full installation guide
  1. 01

    Install

    curl -fsSL https://raw.githubusercontent.com/CodefyUI/CodefyUI/main/install.sh | bash
  2. 02

    Start the server, from any new terminal

    cdui start
  3. 03

    Open the editor

    localhost:8000

Free to use, open to read.

CodefyUI is licensed under AGPL-3.0. Running it as published, on a laptop, in a lab or on a school server, needs no commercial license. For closed-source, SaaS or OEM use, a commercial license is available from the maintainers.

Star on GitHub