Node Reference
CodefyUI ships 152 built-in nodes across 16 categories. Installed plugin packs and your own custom nodes add more.
tip
This table reflects the current release, but the backend is authoritative. Check the live node palette or GET /api/nodes for the nodes available in your installation. Double-click the canvas to search for a node.
| Category | Nodes | Count |
|---|---|---|
| CNN | Conv2d, Conv1d, Conv2dExplicit, ConvTranspose2d, MaxPool2d, AvgPool2d, AdaptiveAvgPool2d, BatchNorm2d, Dropout, Activation | 10 |
| RNN | LSTM, GRU, RNNCell | 3 |
| Transformer | MultiHeadAttention, TransformerEncoder, TransformerDecoder, MoELayer | 4 |
| RL | DQN, PPO, EnvWrapper, RewardModel, KLDivergence, PolicyRollout, PPOClipObjective, GroupRelativeAdvantage, Discount, GridWorldEnv, PreferenceDataset, BradleyTerryLoss, BradleyTerryTrain | 13 |
| Data | 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 | 27 |
| Data Flow | Map, Reduce, Switch | 3 |
| Training | Optimizer, Loss, TrainingLoop, EvaluateModel, LRScheduler, SequentialModel, BackwardOnce | 7 |
| IO | ImageReader, ImageWriter, ImageBatchReader, FileReader, CheckpointSaver, CheckpointLoader, ModelLoader, ModelSaver, Inference, GraphInput, GraphOutput, VideoLoad, VideoWrite | 13 |
| Control | Start | 1 |
| Utility | Print, Reshape, Concat, Flatten, Linear, Visualize, Embedding, PythonScript, ScatterPlot2D, DecisionBoundary | 10 |
| Normalization | BatchNorm1d, LayerNorm, GroupNorm, InstanceNorm2d | 4 |
| Tensor Operations | Add, MatMul, Mean, Multiply, ScalarMultiply, Permute, Softmax, Argmax, Split, Squeeze, Stack, TensorCreate, Unsqueeze, MaskedFill | 14 |
| LLM | LLMChat, Tokenizer, WordVector, TextEmbedding, EmbeddingScatter, CosineSimilarity, AttentionMask, AttentionHeatmap, PositionalEncoding, CausalLMModel, LMCrossEntropyLoss, LMTokenizer, TextCorpusDataset, LMTokenizedDataset, DataMixDataset, PerplexityEvaluate, TextGenerate, DocumentLoader, TextChunker, VectorStore, Retriever, PromptBuilder, HFTextGenerate | 23 |
| Classical | KNN, LinearRegression, LogisticRegression, DecisionTreeClassifier, RandomForestClassifier, SVMClassifier, MLPClassifier, Accuracy | 8 |
| Diffusion | Upsample, TimestepEmbedding, Lerp, GaussianNoise, DDPMSampler, DiffusionUNet, DiffusionTrainingLoop | 7 |
| VLA | VLAModel, VLARollout, VLAActionEval, PushWorldEnv, PushWorldDemos | 5 |
Notable nodes
Start(Control) — defines the execution entry point. Every runnable graph requires one; see Your First Graph.TensorInput(Data) — provides an inline grid for entering explicit tensor values. Teaching Inspector examples use it as their input node.- The transform chain (Data) — nine nodes compose a
transforms.Compose:ResizeTransformresizes to a square;ToTensorTransformconverts a PIL image to a[0, 1]tensor;NormalizeTransformapplies per-channel normalisation and provides presets;RandomCrop,RandomHorizontalFlip,RandomRotation,ColorJitter, andRandAugmentapply augmentations; andComposeTransformjoins two separately constructed chains. See Data and Augmentation for parameters and ordering rules. ImageFolderDataset(Data) — loads images from one directory per class, using the directory structure expected by torchvision'sImageFolder.TrainingLoop(Training) — runs training and sends the live loss chart to the Results panel. Its Advanced section contains the memory controlsprecisionandaccumulate_steps; see Training Memory.SequentialModel(Training) — represents a layer stack in one node. Double-click it to open the Model Architecture Editor. The editor provides a searchable layer palette grouped by category and a canvas for connecting layers. An architecture must have exactly oneInputnode and oneOutputnode, and merge layers have a port-list editor. The controls include Snap: ON/OFF, top-to-bottom Auto Layout, JSON Import and Export, and Apply. Validation rejects cycles.EmbeddingScatter(LLM) — projects embeddings to 2D with PCA or t-SNE and displays a zoomable scatter plot.AttentionHeatmap(LLM) — forwards attention weights, optionally selecting one head, and forwards optional token labels. The node card displays the weights as a heatmap, and a full-size viewer is available.- Pack-backed backends (LLM) —
WordVector'sglove-50dand sentence-encoder options, and all ofTextEmbedding, load models installed by the Package Center. Options without an installed model are greyed out. If a missing option is the graph's saved value, it remains selectable and displays a warning. Graph execution does not download these models. See Optional Packs for pack sizes, file locations, and encoder guidance. - The language-model chain (LLM) — seven nodes form a training path for a GPT-style decoder:
TextCorpusDatasetreads text rows from the Hugging Face Hub or a local.txt;LMTokenizedDatasetcreates fixed-length next-token blocks;DataLoadersupplies batches toTrainingLoop;CausalLMModelprovides the model;LMCrossEntropyLossprovides the loss; andLMTokenizersupplies the shared tokenizer.PerplexityEvaluatescores a held-out split, andTextGeneratesamples from the trained weights. The defaultCausalLMModelhas 203,668,480 parameters; reduced_modelandn_layersfor laptop-scale training. See the Train a Causal LM on TinyStories example in Examples Gallery. - The RAG chain (LLM) — seven nodes use supplied documents as answer context:
DocumentLoaderreads each.mdand.txtin a directory as{text, source};TextChunkercreates embeddable chunks with source names and character offsets;TextEmbeddingcreates vectors;VectorStorestores one[N, D]matrix with the chunk text and searches it with one matrix multiplication;Retrieverreturns the nearesttop_kchunks and their scores;PromptBuilderinserts the chunks and question into a context-only template; andHFTextGenerateruns Qwen2.5-0.5B-Instruct locally.LLMChatcan replaceHFTextGenerateto use Ollama or a hosted provider.TextEmbeddingrequires thesentence-embeddingspack, andHFTextGeneraterequires theragpack. See RAG, fully local and RAG with a chat API in Examples Gallery, and see Optional Packs for the downloads. - The VLA chain (VLA) — the VLA category contains five specialized nodes. A training and evaluation graph connects
PushWorldEnv,PushWorldDemos,VLAModel, andTrainingLoop, then usesVLAActionEvalandVLARollout.PushWorldEnvimplements a language-conditioned 2D push task in torch; distractor pucks make the instruction necessary to identify the goal.PushWorldDemoscreates scripted-expert behaviour-cloning samples and a held-out split.VLAModelcombines a vision stem, byte-level instruction embedding, transformer trunk, and chunked action expert.VLAActionEvalmeasures held-out open-loop MSE against the expert, whileVLARolloutmeasures closed-loop success with receding-horizon execution. The README for Train a VLA on PushWorld recommends a CUDA GPU and reports a run time of about 56 minutes on an RTX 4080. - The RL nodes (RL) —
GridWorldEnvprovides a gridworld without a Gymnasium dependency.PolicyRolloutruns a policy for N episodes and records states, actions, rewards, and logits.Discountcomputes returns,GroupRelativeAdvantagecomputes GRPO's group-mean baseline, andPPOClipObjectivecomputes PPO's clipped surrogate and returns a mask showing which samples used the clipped branch.RewardModelproduces one scalar score per sequence.PreferenceDatasetcreates training and held-out preference pairs;BradleyTerryLosscomputes the preference loss; andBradleyTerryTrainfits a reward head and reports training and held-out accuracy to expose shortcut learning.KLDivergencecomputes the policy-to-reference regularisation term.DQN,PPO, andEnvWrapperintegrate with Gymnasium. See RLHF building blocks: reward + KL in Examples Gallery. - The diffusion chain (Diffusion) —
GaussianNoisecreates seeded noise and can match an upstream tensor's shape.DiffusionUNetprovides a toy U-Net that maps(x, t)to predicted noise, andDiffusionTrainingLooptrains it.DDPMSamplerperforms the reverse process in one node so the graph remains acyclic; its verbose trace records trajectory snapshots.TimestepEmbedding,Upsample, andLerpsupport an explicit construction of the same operations. The Diffusion examples are Forward Process (GaussianNoiseandLerp) and Toy Sampling and Mini U-Net (GaussianNoise→DiffusionUNet→DDPMSampler). See Examples Gallery. ModelSaver/ModelLoader(IO) — write and read model files. Their defaultstate_dictmode stores tensors and imposes no class-loading requirements. Theirfull_modelmode stores the pickled module and loads it with a restricted unpickler that permits torch and CodefyUI layer classes and the two torch activation functions stored by CodefyUI's transformer layers. See Saving and Loading Models for selection and loading requirements.Switch(Data Flow) — uses conditional routing so that only one branch executes.
Port data types
Edges are typed. The built-in data types include: Tensor, Model, Dataset, DataLoader, Optimizer, Loss, Scalar, String, Image, List, Transform, Any, Trigger. The Trigger type is what Start nodes emit to drive execution order, and Transform is what the transform-chain nodes pass to each other.