协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
schedulers【开发与工程】Select, configure, swap, serialize, and troubleshoot Diffusers schedulers, timesteps, sigmas, and noise schedules for inference and tests.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task mentions Diffusers schedulers, samplers, DDIM, DDPM, Euler, DPM-Solver, DPM++, Karras, AYS, timestep spacing, custom timesteps, custom sigmas, prediction_type, rescale_betas_zero_snr, set_timesteps, scheduler.step, or scheduler config round-trips.
prediction_type here when it is known to match the checkpoint.from_config, from_pretrained, and save_pretrained behavior.type(pipe.scheduler).__name__, dict(pipe.scheduler.config), and important fields such as prediction_type, timestep_spacing, num_train_timesteps, and sigma options.NewScheduler.from_config(pipe.scheduler.config, explicit_overrides...); load a scheduler config from a model directory or Hub repo with NewScheduler.from_pretrained(model_id_or_dir, subfolder="scheduler").prediction_type, timestep_spacing, rescale_betas_zero_snr, solver options, and sigma conversion flags.scheduler.set_timesteps(...); in denoising loops call scheduler.scale_model_input(sample, timestep) before the model and consume scheduler.step(...).prev_sample.from diffusers import EulerDiscreteScheduler
pipe.scheduler = EulerDiscreteScheduler.from_config(
pipe.scheduler.config,
prediction_type=pipe.scheduler.config.prediction_type,
timestep_spacing="trailing",
)
from diffusers import DPMSolverMultistepScheduler
pipe.scheduler = DPMSolverMultistepScheduler.from_config(
pipe.scheduler.config,
algorithm_type="sde-dpmsolver++",
solver_order=2,
use_karras_sigmas=True,
)
v_prediction checkpoints:pipe.scheduler = type(pipe.scheduler).from_config(
pipe.scheduler.config,
prediction_type="v_prediction",
rescale_betas_zero_snr=True,
timestep_spacing="trailing",
)
image = pipe(prompt, guidance_rescale=0.7).images[0]
Run the bundled helper after installing Diffusers and Torch:
python path/to/sub-skills/schedulers/scripts/scheduler_smoke.py --help
python path/to/sub-skills/schedulers/scripts/scheduler_smoke.py
Expected signals: common scheduler imports succeed; constructor and step signatures print; short set_timesteps schedules are produced; tiny CPU step checks return finite tensors; and common misuse checks raise the expected errors.