# Score-Based Generative Modeling through SDEs

Official code for Score-Based Generative Modeling through Stochastic Differential Equations (ICLR 2021, Oral)

Repository: https://github.com/yang-song/score_sde
Canonical: https://ross.abutalabs.com/products/score-based-generative-modeling-through-sdes
Homepage: https://arxiv.org/abs/2011.13456
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Topics: score-matching, stochastic-differential-equations, generative-models, score-based-generative-modeling, controllable-generation, inverse-problems, jax, flax, iclr-2021, diffusion-models
Last push: 2022-11-29T23:42:42+00:00
Link (homepage): https://arxiv.org/abs/2011.13456
Link (site_page): https://info.arxiv.org/about/donate.html
Link (site_page): https://info.arxiv.org/labs/index.html
Link (site_page): https://info.arxiv.org/about/ourmembers.html
Link (site_page): https://info.arxiv.org/about

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2068, "days_push": 1373, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1844, forks 232 (observed 2026-08-28T04:05:43.313994+00:00)

## What it is
Official PyTorch implementation of the ICLR 2021 paper 'Score-Based Generative Modeling through Stochastic Differential Equations', unifying score-based and diffusion generative models via SDEs. It supports training NCSN++, DDPM++, and earlier score-based models, sampling, likelihood evaluation, and conditional generation tasks like inpainting, colorization, and class-conditional synthesis.

## Use cases
- train a score-based diffusion model on images
- generate CIFAR-10 or CelebA-HQ samples with an SDE model
- compute exact likelihoods with a neural ODE
- solve inverse problems like image inpainting and colorization
- reproduce NCSN, NCSNv2, DDPM, and DDPM++ baselines
- experiment with custom SDEs, predictors, and correctors

## When to choose
- you need a reference implementation of score-based SDE generative models for research
- you want to train or evaluate diffusion/score models with predictor-corrector samplers
- you need exact likelihood computation or controllable generation from a pretrained score model

## When to avoid
- you want a production-ready, actively maintained diffusion library - use Hugging Face Diffusers instead
- you need fast, optimized sampling for deployment rather than research experimentation
- you work outside image generation and cannot adapt the model architectures

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, image-processing, data-generation
- domain: deep-learning, machine-learning, image-processing, artificial-intelligence
- platform: python
- tags: diffusion-models, score-based-generative-modeling, stochastic-differential-equations, score-matching, pytorch, research-code, iclr-2021, inverse-problems, controllable-generation, gpu

## Member repositories
- yang-song/score_sde (main) score 32
- yang-song/score_sde_pytorch (mirror) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:43.313994+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:52:12.636255+00:00, confidence not recorded.
  - readme: https://github.com/yang-song/score_sde (fetched 2026-08-28T04:05:43.313994+00:00, sha 0bd71993d325)
  - homepage: https://arxiv.org/abs/2011.13456 (fetched 2026-08-29T10:32:16.956603+00:00, sha 18e4c2f607de)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T10:32:16.966331+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T10:32:16.970386+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T10:32:16.972158+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T10:32:16.968564+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
