OpenSoraPlanSample
Sampling Open-Sora-Plan without the decode — the latent middle step
- model
- LATENT
OpenSoraPlanSample is the "I want to control when the decode happens" node in this pack. It takes the model object from OpenSoraPlanLoader, your prompt, and the sampler settings, and returns raw latents instead of finished frames. You'd normally only reach for it if you want to split the pipeline in half - sample first, decode later - or if you're poking at the model's latent output. For everyone else, OpenSoraPlanRun does exactly this and then decodes for you in one node, and that's the path of least resistance.
That said, understanding Sample is what makes Run make sense, because Run is just this node plus a decode bolted on. And once you're here, the thing to keep in mind is the pack's honest era: this is a 2024 open video model, superseded for quality by the Wan/LTX generation. You're not using Sample to win a benchmark; you're using it because you want Open-Sora-Plan specifically, or because you're curious how a CausalVAE-based pipeline is built.
How it works
Sample runs the model's VideoGenPipeline with the frame count from the Loader's version string (65 or 221 frames), using a PNDM scheduler and output_type="latents". Two implementation details matter in practice. First, it parks the VAE on the CPU while the transformer and the big T5-XXL text encoder take the GPU - so VRAM is juggled between phases, and the node is heavier than its input list suggests. Second, force_images (when true) sets the frame count to 1 and disables temporal attention entirely, which turns the node into a single-image sampler.
The output latent is not a standard ComfyUI latent. It's the pipeline's own 5D video tensor - frames × channels × time × height × width - in a LATENT wrapper. That's the single most important thing to understand about this node: it only plugs into OpenSoraPlanDecode. Wiring it into a normal KSampler or VAEDecode will produce a shape error at best and garbage at worst, because it isn't the latent space those nodes work in.
The inputs that matter
Same five sampler knobs as Run, minus the convenience:
prompt- your text. This model's prompt adherence was never its strong suit, so write plain, concrete descriptions and expect to iterate.num_inference_steps- 50 by default, and this model genuinely wants most of them.guidance_scale- 10 by default. High CFG is the model's native habitat.seed- 1234 by default; change it for variety.force_images- false by default; true gives you a still instead of a clip.
The one output is the LATENT, destined for OpenSoraPlanDecode. There's no image to preview at this stage - if you want to see something, add the Decode node or switch to OpenSoraPlanRun.
Installing it
Same shared install as the rest of the pack. ComfyUI Manager, search "Open-Sora-Plan", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/chaojie/ComfyUI-Open-Sora-Plan
then restart, and ensure the Python deps (diffusers, timm, einops, accelerate, imageio) exist in your ComfyUI environment - a red node after install almost always means one of those is missing. Skip the repo's docker requirements.txt; it pins torch 2.0.1 and diffusers 0.24, and installing it into a current ComfyUI is a one-way ticket to brokenness.
The weights aren't bundled. First run pulls them from HuggingFace into a cache_dir next to where ComfyUI launched - the transformer and CausalVAE from LanguageBind/Open-Sora-Plan-v1.0.0, plus the ~11 GB T5-XXL encoder. The first load will sit there for a while; that's downloading, not hanging.
Common issues
- Shape error when you connect the latent elsewhere - you're feeding a non-standard video latent into a node that doesn't speak it. Use
OpenSoraPlanDecode. - Memory errors - the 221-frame version on a mid-range card is a lot. If you hit the wall, re-load with
65x512x512or lean onforce_imagesfor single frames. - No output to preview - correct; this node outputs latents by design. Add Decode or use Run.
The honest advice: use Sample when you have a reason to hold the latents, and OpenSoraPlanRun the rest of the time.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | OpenSoraPlanModel | — | |
| prompt | STRING | — | |
| num_inference_steps | INT | 50 | — |
| guidance_scale | FLOAT | 10.00 | — |
| seed | INT | 1234 | — |
| force_images | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |