MD: AMED Solver (Corrected Euler)
A corrected-Euler sampler that doesn't mush the details
- sampler
- curve_plot
Plain Euler is the reliable workhorse of diffusion sampling - but it's also the one that leaves fine texture on the table, especially in audio spectrograms where the details are everything. AMED is a corrected-Euler solver: it keeps Euler's stability and adds a correction term that sharpens detail at the same step count. It's the "middle ground between fast render speed and high-quality output" the README advertises, and for the ACE-Step audio workflows this pack is built around, it's a legitimately useful swap.
Mechanically it's a sampler object, not a whole sampling node - you get a SAMPLER output that plugs into a sampling node that accepts one (SamplerCustom, or the pack's own sampler wiring), alongside your schedule from any scheduler node.
The inputs
dampening_factor- the strength of the AMED correction, 0.0 to 2.0, default 1.0. At 0.0 it's effectively pure Euler; higher improves detail but risks mathematical instability. The tooltip's warning is the one to heed: reduce it if your output goes black - that's the instability showing up as NaN.force_euler_last_step- defaults to true, and the tooltip calls it "highly required for audio/spectrograms." The final sampling step happens at near-zero sigma where the correction term can leave sharp artifacts; this switches the last step back to plain Euler math to avoid them. Leave it on.debug_mode/enable_profiling- diagnostics. Debug 1 gives a stats report per run; profiling times individual steps. Off for production.
Two outputs: sampler (the SAMPLER object) and curve_plot - an IMAGE showing the dampening/correction curve, which is nice for sanity-checking that your parameters are in the intended regime.
Honest context
Before you chase samplers, remember the KB's rule: for SD 1.5/SDXL, the sampler/scheduler pair is one choice, and DPM++ 2M Karras remains the default for good reason. AMED earns its keep where you're doing audio, or where you want Euler-family stability with a bit more texture and don't want to jump to a fancier multi-step solver. It's also worth knowing the pack ships optional compiled cores, and the source degrades gracefully to standard Euler if the core is missing - so if you see "Falling back to standard Euler" in the console, that's the safety net working, not a crash.
Installing it
Part of MD Nodes (MDMAchine/ComfyUI_MD_Nodes). ComfyUI Manager → search MD_Nodes → Install, restart, or:
cd path/to/ComfyUI/custom_nodes
git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
cd ComfyUI_MD_Nodes
pip install -r requirements.txt
Restart ComfyUI. Python 3.10+, current ComfyUI, GPL v3. The curve_plot output needs matplotlib (in the pack's requirements).
Common issues
Black or garbage output almost always means dampening_factor is too high for your model - dial it toward 1.0 or below before touching anything else. If you're on a flow-matching checkpoint, remember the schedule matters as much as the solver: AMED on an aggressive Karras schedule is a bad pairing on Flux-style models, so match it with a gentler schedule. And leave force_euler_last_step on - turning it off to chase the last 1% of detail is exactly how you get sparkle artifacts at the end of a long render.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| dampening_factor | FLOAT | 1.000–2 | DAMPENING FACTOR • Purpose: Controls the strength of AMED correction. • Range: 0.0 (Pure Euler) to 2.0 (Aggressive Predictor). • Trade-offs: High values improve detail but risk mathematical instability (NaNs). ⭐ Recommended: 1.0 for standard generation. Reduce if output goes black. |
| force_euler_last_step | BOOLEAN | true | FORCE EULER LAST STEP • Purpose: Switches back to simple Euler math for the very final step. • Trade-offs: Prevents sharp artifacts from forming at near-zero sigmas. ⭐ Recommended: True. Highly required for audio/spectrograms. |
| debug_mode | COMBO | 0 - Silent | LOGGING VERBOSITY • Purpose: Controls console output and analytics generation. • Options: 0 (Silent), 1 (Stats/Performance), 2 (Full trace). ⭐ Recommended: 0 - Silent for production. |
| enable_profiling | BOOLEAN | false | ENABLE PROFILING • Purpose: Measure timing of individual sampling steps. • Note: Automatically enabled if debug_mode >= 1. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sampler | SAMPLER | — |
| curve_plot | IMAGE | — |