← Back to Leaderboard
CComfy-Org

Comfy-Org/comfy-kitchen

Multi-backend PyTorch kernels for quantized diffusion inference

View on GitHub ↗
Engineering Health (Methodology)
A · 85/100
Maintenance Activity
● Updated today
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption19/25
Release Cadence11/20
License Clarity20/20
Local AIGPU
Total Stars
★ 265
24h Growth
+0
7d Growth
+2
Forks
137

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

Comfy-Org/comfy-kitchen Star History (2025-12-17 - 2026-12-04) ALL-TIME STAR HISTORY (2025-12 – 2026-12) +264 in 352d · avg +1/day 280 140 0 2025-12-17: ★ 12026-01-10: ★ 312026-02-07: ★ 742026-03-07: ★ 852026-04-04: ★ 902026-05-02: ★ 922026-05-30: ★ 952026-06-27: ★ 1032026-07-25: ★ 1162026-08-22: ★ 1782026-09-19: ★ 2202026-10-17: ★ 2442026-11-08: ★ 2582026-12-04: ★ 265 ★ 265 2025-12 2026-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Comfy Kitchen is an in-process Python/PyTorch operator library for diffusion inference, not a model server. Its registry checks device, dtype, shape, and compute capability before dispatching to a kernel. The documented default order is HIP → CUDA → Triton → eager; Ascend registers separately when torch-npu and a compatible device are present. If no backend accepts the call, dispatch raises NoCapableBackendError rather than trying kernels until one works.

Integration can happen through explicit operator calls or QuantizedTensor, a torch.Tensor subclass that intercepts supported PyTorch operations and dispatches quantized implementations where available. Eager is implemented in PyTorch, Triton kernels are JIT-compiled, and native CUDA and HIP extensions are built through setup.py using CMake and nanobind. The HIP backend compiles its own matmuls from comfy_kitchen/backends/hip/ without linking hipBLAS or hipBLASLt.

Key Capabilities & Differentiators

Operator coverage includes quantization, scaled matmul, AdaLN and RMS-AdaLN, RoPE and RMS-RoPE, 2D/3D neighborhood attention, and INT8 attention. Coverage varies by backend: INT8 attention has CUDA and HIP implementations but no eager entry; NVFP4 scaled matmul has CUDA and eager paths; MXFP8 dequantization and scaled matmul are eager-only. The listed Tensor Core layout floors are SM 8.9 for per-tensor E4M3 FP8 and SM 10.0 for 16-element NVFP4 and 32-element MXFP8 blocks, with E8M0 scales for MXFP8.

HIP uses WMMA GEMMs on RDNA3, RDNA3.5, and RDNA4. RDNA4 supports native FP8 WMMA; RDNA3/3.5 widen FP8 operands to BF16. RDNA2 runs non-WMMA operators such as RoPE, quantizers, and AWQ GEMV. HIP RoPE can act in place on strided Q/K views from packed QKV without first making contiguous copies. The optional Ascend backend uses torch-npu for selected INT8 operators and for interleaved and split-half RoPE.

Trade-offs & Limitations

Compared with plain PyTorch eager or maintaining separate CUDA, HIP, and Triton calls, the registry reduces hardware-specific branching at the integration layer. It does not make quantized formats interchangeable or guarantee a fallback: unsupported shapes or dtypes can bypass the preferred kernel, and operators such as INT8 attention have no eager implementation. Test numerical agreement against an eager reference where one exists and log actual dispatch for the shapes used in production.

Low-precision storage is not proof of lower peak VRAM or faster inference. Ascend convrot_w4a4_linear preserves the caller's rotation and quantization precision but unpacks weights into INT8 for INT32 accumulation; that costs memory and time and retains eager's FP16 range limitations. In contrast, HIP can fold activation into the ConvRot quantizer load to avoid writing a separate activation result to GPU memory. Profile peak memory and end-to-end latency at representative model sizes and concurrency before standardizing on a backend.

Hardware & Deployment Guide

Install comfy-kitchen into a local Python ≥3.10 and PyTorch ≥2.7 environment; no server or hosted inference endpoint is required. CUDA wheels target Linux x86_64 and Windows x64 and require CUDA runtime ≥13.0 and NVIDIA driver r580+. The pure Python wheel ships eager and Triton backends; that does not imply Triton will run on every host. CUDA source builds need Toolkit ≥12.8 and CUDA_HOME; native builds use nanobind ≥2.0, CMake ≥3.26, and Ninja.

On a ROCm-only host, pip install . selects HIP when nvcc is absent. Hosts with both toolchains default to CUDA-only unless COMFY_KITCHEN_BUILD_HIP=1 is set. With build isolation, set COMFY_HIP_ARCHS to target a particular AMD GPU instead of building for the whole target list. Windows HIP builds also need the Windows SDK and the recommended VS 2022 v143 C++ toolset. The package manifest lists version 0.2.42, but no GitHub release is listed, so release history does not establish when specific capabilities landed.

Dispatch: Checks device, dtype, shape and compute capability before selecting a kernel; exposes backend overrides and dispatch logging.
Quantized tensors: Wraps per-tensor E4M3 FP8, 16-element NVFP4 and 32-element MXFP8 layouts in a torch.Tensor subclass.
Format coverage: Triton supports NVFP4 quantization and dequantization but not its scaled matmul; MXFP8 dequantization and scaled matmul are eager-only.
AMD execution: Shared WMMA GEMM tiling uses architecture-specific MMA policies; RDNA4 handles FP8 natively, while RDNA3/3.5 widen to BF16.
Fusion and strides: HIP RoPE can operate in place on strided packed-QKV views, and fused ConvRot INT8 quantization can consume activation without materializing it separately.
Ascend integration: Optional torch-npu paths handle selected INT8 and rotary operators; W4A4 linear unpacks weights to INT8 for INT32 accumulation.
Best For

ComfyUI or other PyTorch diffusion integrations that need a shared operator API and can validate quantized paths on their target GPUs or Ascend NPUs.

Skip If

You need a complete model-serving stack, identical operator coverage across vendors, or already have a tested kernel for a single fixed target and do not need another dispatch layer.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AIGPU
pip install .

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
comfy-kitchen ★265+2PythonApache-2.0Multi-backend PyTorch kernels for quantized diffusion inference
DeepSpeed43.4k+33PythonApache-2.0PyTorch runtime for distributed training and inference under GPU memory constrai
agent-lightning19k+30PythonMITProxy-based reinforcement learning for agents in their existing harnesses
ludwig11.8k+6PythonApache-2.0YAML-first framework for fine-tuning, training, and serving LLMs and multimodal

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/Comfy-Org/comfy-kitchen.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

Comfy-Org/comfy-kitchen Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about comfy-kitchen

How do I integrate the library and verify which kernel path runs?

Call individual operators such as quantize_per_tensor_fp8, or construct a QuantizedTensor with from_float and use it with supported PyTorch operations such as torch.nn.functional.linear. Use ck.list_backends() to inspect availability, ck.use_backend(...) or the operator's backend= argument for controlled comparisons, and DEBUG logging on comfy_kitchen.dispatch to see which path dispatch selects.

How much VRAM should I budget for quantized inference?

There is no fixed requirement. Measure peak allocation and end-to-end inference on your model, input shapes, and concurrency. Check whether the selected operator uses a native low-precision path or widens or unpacks values: RDNA3 FP8 WMMA paths widen to BF16, and Ascend convrot_w4a4_linear unpacks weights to INT8. An eager fallback can also have a different memory and runtime profile.

Can I self-host it or redistribute it in a commercial product?

The project is Apache-2.0 licensed and runs as a local library rather than through a hosted API. For commercial redistribution, review LICENSE and NOTICE, preserve applicable notices, and verify the separate terms of bundled dependencies and accelerator runtimes. The project license does not determine model-weight licensing.

When is it preferable to plain PyTorch or direct CUDA, HIP, or Triton calls?

Use eager PyTorch as the numerical baseline and keep direct backend calls if you only need one well-tested operator on a fixed device. Comfy Kitchen is more useful when your integration needs one API for several operators or hardware targets. Its matrix is not uniform: NVFP4 scaled matmul has CUDA and eager entries but no Triton entry, while MXFP8 scaled matmul is eager-only.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining Comfy-Org/comfy-kitchen? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature Comfy-Org/comfy-kitchen on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare