executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
core-apiUse the DPM-Solver PyTorch and JAX single-file APIs directly: noise schedules, model wrappers, solver settings, inversion/noising helpers, and tiny validation checks.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a user wants to copy DPM-Solver into custom diffusion code, wrap their own model, choose solver settings, debug API calls, or run a small backend smoke test without executing the repository's large examples.
Read this sub-skill for tasks that mention:
NoiseScheduleVP, model_wrapper, DPM_Solver, sample, inverse, or
add_noise.alphas_cumprod, continuous VP SDE schedules, or
log-SNR time steps.algorithm_type="dpmsolver" versus "dpmsolver++", JAX predict_x0,
solver order, skip_type, method, denoise_to_zero, or dynamic
thresholding.../../scripts/dpm_solver_pytorch.py.../../scripts/dpm_solver_jax.py.references/api-reference.md for exact
signatures, backend differences, and minimal integration skeletons.../../references/solver-choice-guide.md
before recommending order/method/step settings.references/noise-schedules-and-wrappers.md
when converting a model's training-time labels or parameterization to the
continuous-time noise prediction interface.import torch
from dpm_solver_pytorch import NoiseScheduleVP, model_wrapper, DPM_Solver
# `model(x, t_input, **kwargs)` must return the model's prediction.
noise_schedule = NoiseScheduleVP(schedule="discrete", betas=betas)
model_fn = model_wrapper(
model,
noise_schedule,
model_type="noise",
guidance_type="uncond",
model_kwargs=model_kwargs,
)
solver = DPM_Solver(model_fn, noise_schedule, algorithm_type="dpmsolver++")
sample = solver.sample(
x_T,
steps=20,
order=2,
skip_type="time_uniform",
method="multistep",
)
import jax.numpy as jnp
from dpm_solver_jax import NoiseScheduleVP, model_wrapper, DPM_Solver
noise_schedule = NoiseScheduleVP(schedule="linear", continuous_beta_0=0.1, continuous_beta_1=20.0)
model_fn = model_wrapper(model, noise_schedule, model_type="noise", guidance_type="uncond")
solver = DPM_Solver(model_fn, noise_schedule, predict_x0=False)
sample = solver.sample(x_T, steps=20, order=3, skip_type="time_uniform", method="singlestep")
schedule="discrete" with betas or alphas_cumprod when adapting a
DDPM-style model trained on integer time labels.schedule="linear" for continuous VP SDE / ScoreSDE-like integration.algorithm_type="dpmsolver++" is the DPM-Solver++ path; in JAX,
use predict_x0=True for the comparable data-prediction solver path.return_intermediate=True only in PyTorch and only for non-adaptive
methods.inverse and add_noise for inversion/editing workflows; the
root JAX file does not expose equivalent public helpers.Read references/troubleshooting.md for API
misuse, tensor shape, dynamic thresholding, JAX classifier-free guidance, and
schedule conversion failures. Read the root
../../references/troubleshooting.md
for install/backend/checkpoint issues shared with examples.
model_type="score", classifier-free guidance, or
thresholding=True in the unpatched root JAX file without warning about the
verified compatibility caveats.