Llama.cpp Native Speculative Config (Compat)
DFlash, DSpark and native MTP — the experimental speculative path that needs a special wheel
- speculative
The word "experimental" is in this node's category for a reason, and it's the first thing to absorb: Llama.cpp Native Speculative Config (Compat) is the bleeding-edge speculative path, bundling DFlash, DSpark, or Native MTP decoding and an optional draft GGUF into one typed connection. Where the n-gram config drafts from your own context for free, this one uses llama.cpp's native speculative APIs - which are faster when they work, and need both a special fork wheel and, in most modes, a second model file.
The preset combo is the master switch, defaulting to Off. The rest of the inputs only matter once you pick a mode. draft_model is required by DFlash, DSpark, and Gemma 4 external MTP - it's the small GGUF that proposes tokens - and ignored by Off and by Qwen 3.5 internal MTP (which uses a model-internal draft). custom_spec_type (default draft-dflash) and custom_mtp_provider (default off) let you pin the exact mechanism. Then the tuning trio: spec_n_max (2, max draft length), spec_n_min (0), and spec_p_min (0, a probability floor for accepting drafts).
That's the honest shape of it: this is a compatibility node for people who already know what DFlash vs DSpark vs MTP means, or who are following a model-specific guide. If the terms mean nothing to you yet, stop here - the n-gram config is the sensible place to start, because it needs no draft model and no experimental fork.
The output is the shared speculative socket that feeds the compact Llama.cpp Generate. Sequential Generate rejects it (decoder history can't be guaranteed independent between resets), and you must choose it or the n-gram config, never both - the modes are mutually exclusive.
Now the actual cost of admission. Native speculative decoding requires the pack author's own llama-cpp-python fork build with the native-speculative extensions compiled in - the code references a craftingmod/llama-cpp-python release (v0.3.46-speculative) and a specific CUDA wheel. That is a separate wheel from the JamePeng multimodal one, it has to match your OS/Python/native backend, and it's the kind of dependency that can eat an afternoon. The docs route the error messages to the release page rather than pretending this is turnkey.
Pack install is otherwise standard:
cd ComfyUI/custom_nodes
git clone https://github.com/craftingmod/ComfyUI-Ollama-ImageList
Restart ComfyUI; ComfyUI 0.19.3+ for the V3 API.
My honest recommendation: treat this node as "read the docs when the benchmark calls for it." Speculative decoding's real-world wins are workload-dependent, and the n-gram path already captures most of the benefit with none of the draft-model hassle. This config exists for the people squeezing every token per second out of Qwen 3.5 or Gemma 4 on a specific GPU - and if that's you, the preset's defaults (draft-dflash, draft model required, spec_n_max 2) are a sane starting point. If it's not you, Off is the right setting and it will stay that way.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | Off | 6 options: Off, External MTP, Internal MTP, DFlash, DSpark, Custom |
| draft_model | COMBO | [no GGUF models found] | Used by External MTP, DFlash, and DSpark. Internal MTP does not use a draft GGUF. |
| draft_n_max | INT | 21–64 | — |
| custom_spec_type | COMBO | draft-dflash | 4 options: none, draft-dflash, draft-dspark, draft-mtp |
| custom_mtp_provider | COMBO | off | 3 options: off, external, internal |
| draft_p_min | FLOAT | 0.000–1 | — |
| draft_n_gpu_layers | COMBO | all | 2 options: auto, all |
| draft_backend_sampling | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| speculative | OLLAMA_IMAGE_LIST_LLAMA_CPP_SPECULATIVE_CONFIG | — |