Open-Source Wikis

/

ComfyUI

/

Packages

/

comfy_extras/

comfyanonymous/ComfyUI

comfy_extras/

The standard library of "extra" built-in nodes — everything that isn't core enough to live in nodes.py but ships out of the box. ~27,000 lines spread over ~100 modules, organized by feature/model family.

Layout

comfy_extras/
├── chainner_models/                 # Vendored ESRGAN/upscaler model code (chaiNNer port)
├── frame_interpolation_models/      # Interpolation backbones (RIFE etc.)
├── nodes_<feature>.py               # One module per node family

File naming convention

Each comfy_extras/nodes_<topic>.py module is self-contained: it imports comfy/ and comfy_api/, defines its node classes, and exposes either:

  • V1 style — a NODE_CLASS_MAPPINGS dict at module scope, or
  • V3 style — a comfy_entrypoint() async function returning a ComfyExtension.

The loader in nodes.init_extra_nodes (see nodes.py) walks the directory and merges what it finds.

How the modules cluster

A rough taxonomy:

Per-architecture model nodes

One module per major model family:

File Models covered
nodes_sd3.py SD3 / SD3.5
nodes_flux.py Flux (dev / schnell / Kontext / Krea)
nodes_hunyuan.py Hunyuan DiT
nodes_hunyuan3d.py Hunyuan3D 2.0/2.1
nodes_lumina2.py Lumina 2
nodes_hidream.py HiDream / HiDream E1.1
nodes_pixart.py Pixart Alpha / Sigma
nodes_qwen.py Qwen Image / Edit
nodes_lt.py, nodes_lt_audio.py, nodes_lt_upsampler.py LTX-Video
nodes_mochi.py Mochi (Genmo)
nodes_wan.py, nodes_wanmove.py Wan 2.1/2.2
nodes_ace.py ACE Step (audio)
nodes_cosmos.py Cosmos
nodes_kandinsky5.py Kandinsky 5
nodes_chroma_radiance.py Chroma Radiance
nodes_zimage.py Z Image
nodes_video_model.py Stable Video Diffusion
nodes_stable_cascade.py Stable Cascade
nodes_stable3d.py Stable Zero123-style 3D
nodes_lotus.py Lotus depth/normals

Sampling and conditioning extras

File What it adds
nodes_custom_sampler.py "Custom Sampler" composable graph (largest extras file: 42 KB)
nodes_advanced_samplers.py Heun++, restart, etc.
nodes_align_your_steps.py AYS schedules
nodes_optimalsteps.py Optimal-steps schedule
nodes_gits.py GITS noise schedule (large)
nodes_eps.py Epsilon prediction conversions
nodes_perpneg.py Perpendicular negative prompts
nodes_pag.py, nodes_sag.py Perturbed / Self-Attention Guidance
nodes_apg.py Adaptive Projected Guidance
nodes_slg.py, nodes_tcfg.py, nodes_nag.py, nodes_cfg.py Various CFG variants
nodes_freelunch.py, nodes_fresca.py, nodes_mahiro.py, nodes_hypertile.py Inference tweaks
nodes_easycache.py Inference caching for diffusion (FBCache-like)
nodes_torch_compile.py torch.compile wrapper
nodes_attention_multiply.py Attention scale tricks
nodes_differential_diffusion.py Differential Diffusion
nodes_context_windows.py Sliding window context (mainly for video)
nodes_rope.py, nodes_camera_trajectory.py RoPE and video camera helpers

Conditioning, loaders, hooks

File What it adds
nodes_cond.py Conditioning combinators
nodes_clip_sdxl.py, nodes_textgen.py SDXL CLIP and text generation
nodes_hooks.py Hook framework UI nodes
nodes_controlnet.py ControlNet apply nodes
nodes_model_advanced.py, nodes_model_downscale.py, nodes_model_merging.py, nodes_model_merging_model_specific.py, nodes_model_patch.py Model surgery
nodes_lora_debug.py, nodes_lora_extract.py LoRA tooling
nodes_hypernetwork.py Hypernetwork loader
nodes_photomaker.py PhotoMaker
nodes_ip2p.py InstructPix2Pix
nodes_gligen.py (in core), nodes_edit_model.py GLIGEN, edit-model wrappers

Image and mask ops

File What it adds
nodes_images.py Image transforms (resize, pad, blend, …)
nodes_post_processing.py Color, sharpen, blur, levels (40 KB)
nodes_mask.py Mask ops
nodes_compositing.py Layer compositing
nodes_image_compare.py A/B compare nodes
nodes_canny.py Canny edge detection (V3 example)
nodes_morphology.py Morphology (dilate/erode/etc.)
nodes_color.py, nodes_curve.py Color and curves
nodes_glsl.py GLSL shader runner (37 KB)

Video, audio, 3D

File What it adds
nodes_video.py, nodes_frame_interpolation.py Video I/O + interpolation
nodes_audio.py, nodes_audio_encoder.py Audio loading, encoding, encoders
nodes_load_3d.py Load 3D meshes
nodes_webcam.py Webcam capture

Training, dataset, primitives

File What it adds
nodes_train.py In-app fine-tuning workflows (53 KB)
nodes_dataset.py Dataset construction nodes (53 KB)
nodes_primitive.py Primitive UI widgets (Int, Float, String, …)
nodes_logic.py Branching / boolean logic
nodes_math.py, nodes_number_convert.py, nodes_resolution.py Math + helpers
nodes_string.py String ops
nodes_replacements.py Node replacement system
nodes_toolkit.py Misc toolkit
nodes_painter.py Painter widget
nodes_preview_any.py Preview-any-type node
nodes_nop.py, nodes_rebatch.py No-op, rebatching

Vision adapters

File What it adds
nodes_sam3.py SAM 3 segmentation (26 KB)
nodes_sdpose.py SDPose human pose (35 KB)
nodes_rtdetr.py RT-DETR detection
nodes_upscale_model.py, nodes_sdupscale.py Upscaling
nodes_tomesd.py Token-merge for SD
nodes_latent.py Latent ops

Vendored dependencies

  • comfy_extras/chainner_models/ — ESRGAN and friends, ported from chaiNNer.
  • comfy_extras/frame_interpolation_models/ — RIFE and similar.

These are kept in-tree so users don't need separate pip installs.

Integration points

  • Loaded by nodes.init_extra_nodes in nodes.py at startup.
  • Imports comfy/ for actual ML work.
  • Newer modules import from comfy_api/latest (V3 schema); older ones use V1 INPUT_TYPES.

Where to start a change

  • Adding a new sampling tweak: model after nodes_pag.py or nodes_apg.py (small, focused).
  • Adding a new model family's nodes: model after the most recent file (e.g., nodes_zimage.py, nodes_chroma_radiance.py).
  • A complete worked V3 example is nodes_canny.py — only 40 lines including extension boilerplate.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

comfy_extras/ – ComfyUI wiki | Factory