BiliSakura/EDM2-diffusers

Model

0

stars

3

commits

1

repos using this model

2

linked in READMEs

May 29, 2026

updated

class-conditional
diffusers
edm2
image-generation
imagenet
safetensors
unconditional-image-generation
Browse cluster: Diffusion Models & Image Generation

README

EDM2-diffusers

Diffusers-ready checkpoints for EDM2 (Analyzing and Improving the Training Dynamics of Diffusion Models), converted from NVlabs/edm2 post-hoc reconstructions.

Official source weights: https://nvlabs-fi-cdn.nvidia.com/edm2/posthoc-reconstructions/

This root folder is a model collection that contains:

  • edm2-img512-xs-fid
  • edm2-img512-s-fid
  • edm2-img512-m-fid
  • edm2-img512-l-fid
  • edm2-img512-l-dino
  • edm2-img512-xl-fid
  • edm2-img512-xxl-fid

Each subfolder is a self-contained Diffusers model repo with:

  • pipeline.py
  • unet/unet_edm2.py
  • scheduler/scheduler_config.json (EDMEulerScheduler)
  • unet/diffusion_pytorch_model.safetensors
  • vae/diffusion_pytorch_model.safetensors

Demo

edm2-img512-xxl-fid demo

Class-conditional sample (ImageNet class 207, golden retriever), EDM2-XXL at 512×512, 32 steps, guidance 1.0, seed 42.

Model Paths

Use paths relative to this root README:

ModelNVlabs presetFIDLocal path
EDM2-XSedm2-img512-xs-fid3.53./edm2-img512-xs-fid
EDM2-Sedm2-img512-s-fid2.56./edm2-img512-s-fid
EDM2-Medm2-img512-m-fid2.25./edm2-img512-m-fid
EDM2-Ledm2-img512-l-fid2.06./edm2-img512-l-fid
EDM2-L (DINO)edm2-img512-l-dino./edm2-img512-l-dino
EDM2-XLedm2-img512-xl-fid1.96./edm2-img512-xl-fid
EDM2-XXLedm2-img512-xxl-fid1.91./edm2-img512-xxl-fid

Inference Demo (Diffusers)

1) Load a local subfolder checkpoint

from pathlib import Path
import torch
from diffusers import DiffusionPipeline

model_dir = Path("./edm2-img512-xxl-fid")  # change to any path in the table above
pipe = DiffusionPipeline.from_pretrained(
    str(model_dir),
    local_files_only=True,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
).to("cuda")

generator = torch.Generator(device="cuda").manual_seed(42)
image = pipe(
    class_labels=207,          # golden retriever (ImageNet id); omit for random class
    num_inference_steps=32,
    guidance_scale=1.0,        # >1.0 requires a gnet/ checkpoint
    generator=generator,
).images[0]
image.save("demo.png")

Official inference defaults (generate_images.py): num_steps=32, sigma_min=0.002, sigma_max=80, rho=7, guidance=1.0 (no gnet), S_churn=0. Heun sampling runs in float32 internally even when UNet/VAE weights are loaded in bf16/fp16.

Guided presets require a converted gnet/ folder and guidance_scale matching the NVlabs preset.

2) Convert a legacy .pkl

python scripts/convert_edm2_to_diffusers.py \
  --checkpoint models/BiliSakura/EDM2-diffusers/edm2-img512-xs-2147483-0.135.pkl \
  --output models/BiliSakura/EDM2-diffusers

Creates edm2-img512-xs-fid/ automatically from the NVlabs preset mapping.

Checkpoint preset mapping

Maps NVlabs --preset=... names from generate_images.py to source pickle filenames and local Diffusers directories.

EDM2 paper — ImageNet-512 (conditional)

NVlabs presetSource .pkl (net)Diffusers dirMetric
edm2-img512-xs-fidedm2-img512-xs-2147483-0.135.pkledm2-img512-xs-fid/FID 3.53
edm2-img512-xs-dinoedm2-img512-xs-2147483-0.200.pklFDDINOv2 103.39
edm2-img512-s-fidedm2-img512-s-2147483-0.130.pkledm2-img512-s-fid/FID 2.56
edm2-img512-s-dinoedm2-img512-s-2147483-0.190.pklFDDINOv2 68.64
edm2-img512-m-fidedm2-img512-m-2147483-0.100.pkledm2-img512-m-fid/FID 2.25
edm2-img512-m-dinoedm2-img512-m-2147483-0.155.pklFDDINOv2 58.44
edm2-img512-l-fidedm2-img512-l-1879048-0.085.pkledm2-img512-l-fid/FID 2.06
edm2-img512-l-dinoedm2-img512-l-1879048-0.155.pkledm2-img512-l-dino/FDDINOv2 52.25
edm2-img512-xl-fidedm2-img512-xl-1342177-0.085.pkledm2-img512-xl-fid/FID 1.96
edm2-img512-xl-dinoedm2-img512-xl-1342177-0.155.pklFDDINOv2 45.96
edm2-img512-xxl-fidedm2-img512-xxl-0939524-0.070.pkledm2-img512-xxl-fid/FID 1.91
edm2-img512-xxl-dinoedm2-img512-xxl-0939524-0.150.pklFDDINOv2 42.84

EDM2 paper — ImageNet-64 (conditional)

NVlabs presetSource .pkl (net)Metric
edm2-img64-s-fidedm2-img64-s-1073741-0.075.pklFID 1.58
edm2-img64-m-fidedm2-img64-m-2147483-0.060.pklFID 1.43
edm2-img64-l-fidedm2-img64-l-1073741-0.040.pklFID 1.33
edm2-img64-xl-fidedm2-img64-xl-0671088-0.040.pklFID 1.33

EDM2 paper — classifier-free guidance (ImageNet-512)

Use guidance_scale below and include the converted gnet/ checkpoint.

NVlabs presetSource .pkl (net)Source .pkl (gnet)GuidanceMetric
edm2-img512-xs-guid-fidedm2-img512-xs-2147483-0.045.pkledm2-img512-xs-uncond-2147483-0.045.pkl1.40FID 2.91
edm2-img512-xs-guid-dinoedm2-img512-xs-2147483-0.150.pkledm2-img512-xs-uncond-2147483-0.150.pkl1.70FDDINOv2 79.94
edm2-img512-s-guid-fidedm2-img512-s-2147483-0.025.pkledm2-img512-xs-uncond-2147483-0.025.pkl1.40FID 2.23
edm2-img512-s-guid-dinoedm2-img512-s-2147483-0.085.pkledm2-img512-xs-uncond-2147483-0.085.pkl1.90FDDINOv2 52.32
edm2-img512-m-guid-fidedm2-img512-m-2147483-0.030.pkledm2-img512-xs-uncond-2147483-0.030.pkl1.20FID 2.01
edm2-img512-m-guid-dinoedm2-img512-m-2147483-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl2.00FDDINOv2 41.98
edm2-img512-l-guid-fidedm2-img512-l-1879048-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl1.20FID 1.88
edm2-img512-l-guid-dinoedm2-img512-l-1879048-0.035.pkledm2-img512-xs-uncond-2147483-0.035.pkl1.70FDDINOv2 38.20
edm2-img512-xl-guid-fidedm2-img512-xl-1342177-0.020.pkledm2-img512-xs-uncond-2147483-0.020.pkl1.20FID 1.85
edm2-img512-xl-guid-dinoedm2-img512-xl-1342177-0.030.pkledm2-img512-xs-uncond-2147483-0.030.pkl1.70FDDINOv2 35.67
edm2-img512-xxl-guid-fidedm2-img512-xxl-0939524-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl1.20FID 1.81
edm2-img512-xxl-guid-dinoedm2-img512-xxl-0939524-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl1.70FDDINOv2 33.09

Autoguidance paper

NVlabs presetSource .pkl (net)Source .pkl (gnet)GuidanceMetric
edm2-img512-s-autog-fidedm2-img512-s-2147483-0.070.pkledm2-img512-xs-0134217-0.125.pkl2.10FID 1.34
edm2-img512-s-autog-dinoedm2-img512-s-2147483-0.120.pkledm2-img512-xs-0134217-0.165.pkl2.45FDDINOv2 36.67
edm2-img512-xxl-autog-fidedm2-img512-xxl-0939524-0.075.pkledm2-img512-m-0268435-0.155.pkl2.05FID 1.25
edm2-img512-xxl-autog-dinoedm2-img512-xxl-0939524-0.130.pkledm2-img512-m-0268435-0.205.pkl2.30FDDINOv2 24.18
edm2-img512-s-uncond-autog-fidedm2-img512-s-uncond-2147483-0.070.pkledm2-img512-xs-uncond-0134217-0.110.pkl2.85FID 3.86
edm2-img512-s-uncond-autog-dinoedm2-img512-s-uncond-2147483-0.090.pkledm2-img512-xs-uncond-0134217-0.125.pkl2.90FDDINOv2 90.39
edm2-img64-s-autog-fidedm2-img64-s-1073741-0.045.pkledm2-img64-xs-0134217-0.110.pkl1.70FID 1.01
edm2-img64-s-autog-dinoedm2-img64-s-1073741-0.105.pkledm2-img64-xs-0134217-0.175.pkl2.20FDDINOv2 31.85

NVlabs preset shorthand

# EDM2 paper
edm2-img512-{xs|s|m|l|xl|xxl}-{fid|dino}
edm2-img64-{s|m|l|xl}-fid
edm2-img512-{xs|s|m|l|xl|xxl}-guid-{fid|dino}

# Autoguidance paper
edm2-img512-{s|xxl}-autog-{fid|dino}
edm2-img512-s-uncond-autog-{fid|dino}
edm2-img64-s-autog-{fid|dino}

Example NVlabs command:

python generate_images.py --preset=edm2-img512-s-guid-dino --outdir=out

Equivalent expanded form:

python generate_images.py \
  --net=https://nvlabs-fi-cdn.nvidia.com/edm2/posthoc-reconstructions/edm2-img512-s-2147483-0.085.pkl \
  --gnet=https://nvlabs-fi-cdn.nvidia.com/edm2/posthoc-reconstructions/edm2-img512-xs-uncond-2147483-0.085.pkl \
  --guidance=1.9 \
  --outdir=out

Contributors

BiliSakura

3 commits

BiliSakura/EDM2-diffusers

Model

0

stars

3

commits

1

repos using this model

2

linked in READMEs

May 29, 2026

updated

class-conditional
diffusers
edm2
image-generation
imagenet
safetensors
unconditional-image-generation
Browse cluster: Diffusion Models & Image Generation

README

EDM2-diffusers

Diffusers-ready checkpoints for EDM2 (Analyzing and Improving the Training Dynamics of Diffusion Models), converted from NVlabs/edm2 post-hoc reconstructions.

Official source weights: https://nvlabs-fi-cdn.nvidia.com/edm2/posthoc-reconstructions/

This root folder is a model collection that contains:

  • edm2-img512-xs-fid
  • edm2-img512-s-fid
  • edm2-img512-m-fid
  • edm2-img512-l-fid
  • edm2-img512-l-dino
  • edm2-img512-xl-fid
  • edm2-img512-xxl-fid

Each subfolder is a self-contained Diffusers model repo with:

  • pipeline.py
  • unet/unet_edm2.py
  • scheduler/scheduler_config.json (EDMEulerScheduler)
  • unet/diffusion_pytorch_model.safetensors
  • vae/diffusion_pytorch_model.safetensors

Demo

edm2-img512-xxl-fid demo

Class-conditional sample (ImageNet class 207, golden retriever), EDM2-XXL at 512×512, 32 steps, guidance 1.0, seed 42.

Model Paths

Use paths relative to this root README:

ModelNVlabs presetFIDLocal path
EDM2-XSedm2-img512-xs-fid3.53./edm2-img512-xs-fid
EDM2-Sedm2-img512-s-fid2.56./edm2-img512-s-fid
EDM2-Medm2-img512-m-fid2.25./edm2-img512-m-fid
EDM2-Ledm2-img512-l-fid2.06./edm2-img512-l-fid
EDM2-L (DINO)edm2-img512-l-dino./edm2-img512-l-dino
EDM2-XLedm2-img512-xl-fid1.96./edm2-img512-xl-fid
EDM2-XXLedm2-img512-xxl-fid1.91./edm2-img512-xxl-fid

Inference Demo (Diffusers)

1) Load a local subfolder checkpoint

from pathlib import Path
import torch
from diffusers import DiffusionPipeline

model_dir = Path("./edm2-img512-xxl-fid")  # change to any path in the table above
pipe = DiffusionPipeline.from_pretrained(
    str(model_dir),
    local_files_only=True,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
).to("cuda")

generator = torch.Generator(device="cuda").manual_seed(42)
image = pipe(
    class_labels=207,          # golden retriever (ImageNet id); omit for random class
    num_inference_steps=32,
    guidance_scale=1.0,        # >1.0 requires a gnet/ checkpoint
    generator=generator,
).images[0]
image.save("demo.png")

Official inference defaults (generate_images.py): num_steps=32, sigma_min=0.002, sigma_max=80, rho=7, guidance=1.0 (no gnet), S_churn=0. Heun sampling runs in float32 internally even when UNet/VAE weights are loaded in bf16/fp16.

Guided presets require a converted gnet/ folder and guidance_scale matching the NVlabs preset.

2) Convert a legacy .pkl

python scripts/convert_edm2_to_diffusers.py \
  --checkpoint models/BiliSakura/EDM2-diffusers/edm2-img512-xs-2147483-0.135.pkl \
  --output models/BiliSakura/EDM2-diffusers

Creates edm2-img512-xs-fid/ automatically from the NVlabs preset mapping.

Checkpoint preset mapping

Maps NVlabs --preset=... names from generate_images.py to source pickle filenames and local Diffusers directories.

EDM2 paper — ImageNet-512 (conditional)

NVlabs presetSource .pkl (net)Diffusers dirMetric
edm2-img512-xs-fidedm2-img512-xs-2147483-0.135.pkledm2-img512-xs-fid/FID 3.53
edm2-img512-xs-dinoedm2-img512-xs-2147483-0.200.pklFDDINOv2 103.39
edm2-img512-s-fidedm2-img512-s-2147483-0.130.pkledm2-img512-s-fid/FID 2.56
edm2-img512-s-dinoedm2-img512-s-2147483-0.190.pklFDDINOv2 68.64
edm2-img512-m-fidedm2-img512-m-2147483-0.100.pkledm2-img512-m-fid/FID 2.25
edm2-img512-m-dinoedm2-img512-m-2147483-0.155.pklFDDINOv2 58.44
edm2-img512-l-fidedm2-img512-l-1879048-0.085.pkledm2-img512-l-fid/FID 2.06
edm2-img512-l-dinoedm2-img512-l-1879048-0.155.pkledm2-img512-l-dino/FDDINOv2 52.25
edm2-img512-xl-fidedm2-img512-xl-1342177-0.085.pkledm2-img512-xl-fid/FID 1.96
edm2-img512-xl-dinoedm2-img512-xl-1342177-0.155.pklFDDINOv2 45.96
edm2-img512-xxl-fidedm2-img512-xxl-0939524-0.070.pkledm2-img512-xxl-fid/FID 1.91
edm2-img512-xxl-dinoedm2-img512-xxl-0939524-0.150.pklFDDINOv2 42.84

EDM2 paper — ImageNet-64 (conditional)

NVlabs presetSource .pkl (net)Metric
edm2-img64-s-fidedm2-img64-s-1073741-0.075.pklFID 1.58
edm2-img64-m-fidedm2-img64-m-2147483-0.060.pklFID 1.43
edm2-img64-l-fidedm2-img64-l-1073741-0.040.pklFID 1.33
edm2-img64-xl-fidedm2-img64-xl-0671088-0.040.pklFID 1.33

EDM2 paper — classifier-free guidance (ImageNet-512)

Use guidance_scale below and include the converted gnet/ checkpoint.

NVlabs presetSource .pkl (net)Source .pkl (gnet)GuidanceMetric
edm2-img512-xs-guid-fidedm2-img512-xs-2147483-0.045.pkledm2-img512-xs-uncond-2147483-0.045.pkl1.40FID 2.91
edm2-img512-xs-guid-dinoedm2-img512-xs-2147483-0.150.pkledm2-img512-xs-uncond-2147483-0.150.pkl1.70FDDINOv2 79.94
edm2-img512-s-guid-fidedm2-img512-s-2147483-0.025.pkledm2-img512-xs-uncond-2147483-0.025.pkl1.40FID 2.23
edm2-img512-s-guid-dinoedm2-img512-s-2147483-0.085.pkledm2-img512-xs-uncond-2147483-0.085.pkl1.90FDDINOv2 52.32
edm2-img512-m-guid-fidedm2-img512-m-2147483-0.030.pkledm2-img512-xs-uncond-2147483-0.030.pkl1.20FID 2.01
edm2-img512-m-guid-dinoedm2-img512-m-2147483-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl2.00FDDINOv2 41.98
edm2-img512-l-guid-fidedm2-img512-l-1879048-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl1.20FID 1.88
edm2-img512-l-guid-dinoedm2-img512-l-1879048-0.035.pkledm2-img512-xs-uncond-2147483-0.035.pkl1.70FDDINOv2 38.20
edm2-img512-xl-guid-fidedm2-img512-xl-1342177-0.020.pkledm2-img512-xs-uncond-2147483-0.020.pkl1.20FID 1.85
edm2-img512-xl-guid-dinoedm2-img512-xl-1342177-0.030.pkledm2-img512-xs-uncond-2147483-0.030.pkl1.70FDDINOv2 35.67
edm2-img512-xxl-guid-fidedm2-img512-xxl-0939524-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl1.20FID 1.81
edm2-img512-xxl-guid-dinoedm2-img512-xxl-0939524-0.015.pkledm2-img512-xs-uncond-2147483-0.015.pkl1.70FDDINOv2 33.09

Autoguidance paper

NVlabs presetSource .pkl (net)Source .pkl (gnet)GuidanceMetric
edm2-img512-s-autog-fidedm2-img512-s-2147483-0.070.pkledm2-img512-xs-0134217-0.125.pkl2.10FID 1.34
edm2-img512-s-autog-dinoedm2-img512-s-2147483-0.120.pkledm2-img512-xs-0134217-0.165.pkl2.45FDDINOv2 36.67
edm2-img512-xxl-autog-fidedm2-img512-xxl-0939524-0.075.pkledm2-img512-m-0268435-0.155.pkl2.05FID 1.25
edm2-img512-xxl-autog-dinoedm2-img512-xxl-0939524-0.130.pkledm2-img512-m-0268435-0.205.pkl2.30FDDINOv2 24.18
edm2-img512-s-uncond-autog-fidedm2-img512-s-uncond-2147483-0.070.pkledm2-img512-xs-uncond-0134217-0.110.pkl2.85FID 3.86
edm2-img512-s-uncond-autog-dinoedm2-img512-s-uncond-2147483-0.090.pkledm2-img512-xs-uncond-0134217-0.125.pkl2.90FDDINOv2 90.39
edm2-img64-s-autog-fidedm2-img64-s-1073741-0.045.pkledm2-img64-xs-0134217-0.110.pkl1.70FID 1.01
edm2-img64-s-autog-dinoedm2-img64-s-1073741-0.105.pkledm2-img64-xs-0134217-0.175.pkl2.20FDDINOv2 31.85

NVlabs preset shorthand

# EDM2 paper
edm2-img512-{xs|s|m|l|xl|xxl}-{fid|dino}
edm2-img64-{s|m|l|xl}-fid
edm2-img512-{xs|s|m|l|xl|xxl}-guid-{fid|dino}

# Autoguidance paper
edm2-img512-{s|xxl}-autog-{fid|dino}
edm2-img512-s-uncond-autog-{fid|dino}
edm2-img64-s-autog-{fid|dino}

Example NVlabs command:

python generate_images.py --preset=edm2-img512-s-guid-dino --outdir=out

Equivalent expanded form:

python generate_images.py \
  --net=https://nvlabs-fi-cdn.nvidia.com/edm2/posthoc-reconstructions/edm2-img512-s-2147483-0.085.pkl \
  --gnet=https://nvlabs-fi-cdn.nvidia.com/edm2/posthoc-reconstructions/edm2-img512-xs-uncond-2147483-0.085.pkl \
  --guidance=1.9 \
  --outdir=out

Contributors

BiliSakura

3 commits