---
name: sampler_name
lang: py
domain: ml
version: "1.0.0"
algebraic: sum
definition: |
  SamplerName = Literal[
      "euler",
      "euler_a",
      "dpm++2m",
      "dpm++2m_v2",
      "heun",
      "dpm2",
      "lcm",
  ]
description: "Subset estricto de samplers compartido entre diffusers y stable-diffusion.cpp. Cada valor tiene correspondencia directa en ambos backends."
tags: [ml, diffusion, sampler, scheduler, stable-diffusion, diffusers]
uses_types: []
file_path: "python/functions/ml/sampler_name.py"
---

## Notas

Tipo suma — exactamente uno de los valores literales. No hay valor por defecto definido aqui; `GenerationConfig` lo establece.

Correspondencia de backends:

| SamplerName  | diffusers scheduler         | sd.cpp --sampling-method |
|--------------|-----------------------------|--------------------------|
| euler        | EulerDiscreteScheduler      | euler                    |
| euler_a      | EulerAncestralDiscreteScheduler | euler_a              |
| dpm++2m      | DPMSolverMultistepScheduler | dpm++2m                  |
| dpm++2m_v2   | DPMSolverMultistepScheduler v2 | dpm++2m_v2            |
| heun         | HeunDiscreteScheduler       | heun                     |
| dpm2         | KDPM2DiscreteScheduler      | dpm2                     |
| lcm          | LCMScheduler                | lcm                      |

Para agregar nuevos samplers: crear un nuevo tipo o extender con `Union[SamplerName, Literal["nuevo"]]` en el consumidor. No modificar este tipo para mantener el contrato con Go.
