SamplerCustom (Mochi Wrapper)
The KSampler Mochi edits actually run through — SamplerCustom (Mochi Wrapper)
- model
- positive
- negative
- sigmas
- latents
- sampler
- samples
If you've used ComfyUI's KSampler or SamplerCustom, you already know how to use this node - which is the point. SamplerCustom (Mochi Wrapper) is the same idea rebuilt for kijai's Mochi wrapper: you hand it a model, conditioning, sigmas, latents, and a SAMPLER, and it runs the sampling loop. In the logtd/ComfyUI-MochiEdit pack, it's the workhorse that both the Mochi Unsampler and Mochi Resampler plug into. On its own it does nothing interesting; with those two custom samplers it becomes the engine of the whole RF-Inversion video-edit trick.
The confusing part for beginners: this one node gets used in two completely different configurations depending on which direction you're going. That's not a bug, it's the design.
The inputs
Nine inputs, and the ones that matter depend on the pass:
model- aMOCHIMODEL, i.e. the Mochi model as loaded by the wrapper's loader nodes. This type only exists because you installed ComfyUI-MochiWrapper.positive/negative- conditioning. In the unsampling pass (video → noise) both must be blank prompts. In the resampling pass (noise → edited video)positiveis your target prompt andnegativecan be whatever works for normal Mochi.cfg- the classic guidance scale. Unsampling: always 1.0. Resampling: whatever Mochi likes, roughly 4.5.sigmas- must come through Mochi Prepare Sigmas, then flipped for unsampling, not flipped for resampling. This is the #1 thing people get backwards.latents- for unsampling, the encoded video; for resampling, the unsampled noise from the first pass. Do not feed the original video here on the second pass or the "edit" is just the original.add_noise- False for unsampling (the video is already your starting point). Leave it on for normal generation if you use this node outside the edit workflow.seed- effectively irrelevant in the edit workflow; the author says there's no reason to change it.sampler- theSAMPLERfrom Mochi Unsampler or Mochi Resampler. This is the knob that makes the pass go backward or forward-with-guidance.
Output is a single samples LATENT, ready for the wrapper's VAE decoder.
How it works under the hood
The source wires the model through a model_fn that runs the DiT and applies CFG exactly like ComfyUI's own samplers (out_uncond + cfg * (out_cond - out_uncond), or just conditional when cfg <= 1.0), then hands the whole thing to the SAMPLER function you connected. Notably, it also accepts conditioning straight from the standard CLIPTextEncode output, which saves you from hunting for wrapper-specific text-encode nodes. It's a thin, well-behaved adapter - which is exactly what you want from a node that has to be correct in two opposite modes.
Install
This pack has no Mochi support of its own, so install the wrapper first:
cd ComfyUI/custom_nodes
git clone https://github.com/logtd/ComfyUI-MochiEdit
Restart. No extra Python requirements - the pack ships no requirements.txt.
Gotchas
The classic failure is a mismatch between the wrapper and this pack: the repos were merged together by their authors (the git history literally contains a merge from kijai), so if the node errors or the MOCHIMODEL type won't connect, update the wrapper first - that was the fix people needed at launch. And set expectations about the ecosystem: this is a November 2024 tool for Mochi, a VRAM-hungry early video model that most people have since left for LTX or Wan. Niche, but if you're editing Mochi clips, this is the sampler you'll reach for every time.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MOCHIMODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| cfg | FLOAT | 4.500–30 | — |
| seed | INT | 00–18446744073709550000 | — |
| sigmas | SIGMAS | Override sigma schedule and steps | |
| latents | LATENT | — | |
| sampler | SAMPLER | — | |
| add_noise | BOOLEAN | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |