← all repositories
siliconflow/onediff

A compiler pass for your Stable Diffusion stack

It compiles PyTorch diffusion pipelines behind the scenes so ComfyUI, Diffusers, and SD WebUI run faster without rewriting workflows.

2k stars Jupyter Notebook Inference · ServingImage · Video · Audio
onediff
Not currently ranked — collecting fresh signals.
star history

What it does OneDiff is a PyTorch compilation layer that accelerates diffusion models without forcing you to abandon ComfyUI, HuggingFace Diffusers, or SD WebUI. It injects optimized GPU kernels and recompiles graphs behind the scenes, claiming speedups around 1.7× for Kolors and up to 3× for SDXL or Stable Video Diffusion when paired with DeepCache and INT8 quantization.

The interesting bit Rather than shipping a monolithic runtime, the project offers two compiler backends—OneFlow for most NVIDIA GPUs and Nexfort for DiT-style models or H100s—so you can pick the toolchain that matches your hardware. It also serializes compiled graphs, which means you can eat the roughly one-minute SDXL compilation cost once and then reload the optimized artifact for future runs.

Key highlights

  • Drop-in support for ComfyUI, HF Diffusers, and SD WebUI; no workflow migration required.
  • Two compiler backends: OneFlow (general use) and Nexfort (DiT / H100).
  • Save and load compiled models to avoid repeated compilation overhead in production.
  • Dynamic image sizes are supported without recompilation penalty, and LoRA switching lands in hundreds of milliseconds.
  • The feature matrix splits support into Community and Enterprise tiers across image and video models.

Caveats

  • As of February 2024, the README admits there is still no way to run Stable Video Diffusion with TensorRT, so parity with some competing stacks is incomplete.
  • Native Windows is unsupported; you are expected to run inside WSL2.
  • OneFlow optimizations are gradually migrating to Nexfort, so the backend landscape may shift.

Verdict Try it if you run diffusion inference in production or heavy ComfyUI workflows and want faster generation without swapping frameworks. Skip it if you need native Windows support or guaranteed TensorRT coverage for video models.

Frequently asked

What is siliconflow/onediff?
It compiles PyTorch diffusion pipelines behind the scenes so ComfyUI, Diffusers, and SD WebUI run faster without rewriting workflows.
Is onediff open source?
Yes — siliconflow/onediff is open source, released under the Apache-2.0 license.
What language is onediff written in?
siliconflow/onediff is primarily written in Jupyter Notebook.
How popular is onediff?
siliconflow/onediff has 2k stars on GitHub.
Where can I find onediff?
siliconflow/onediff is on GitHub at https://github.com/siliconflow/onediff.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.