PhysisServe

PhysisServe — Wan2.1 1.3B · StreamDiffusionV2

Wan2.1 1.3B autoregressive video weights from StreamDiffusionV2, reorganized by Physis-AI into Diffusers format for PhysisServe. The sdv2 suffix credits the original weight release; this is a format conversion, not a new Physis-AI training run.

Code · Technical blog · Model collection

These weights are intended for PhysisServe's four-step autoregressive inference. The Diffusers component layout does not make a stock Diffusers pipeline equivalent to this inference procedure: same-step KV caching, the attention sink, and the denoising schedule are implemented by PhysisServe.

Inference profile

The following defaults are defined by the PhysisServe model profile.

Setting Default
Resolution (width × height) 832 × 480
Output FPS 16
Denoising steps per chunk 4
First chunk 3 latent frames
Each subsequent chunk 1 latent frame
Chunks per generation, including the first 19
Attention sink Clean bootstrap, σ = 0
KV history Up to 18 recent chunks, plus the first-chunk sink without duplication

At denoising step s, a chunk reads noisy KV entries recorded at the same step s by preceding chunks. The first chunk is generated before the rest and receives an additional forward pass to build the persistent sink. A latent frame is not a decoded video frame; the VAE determines the temporal expansion. FPS is fixed by the model profile.

Quick start

Use Python 3.10+ with a CUDA-enabled PyTorch installation, then install PhysisServe:

pip install "git+https://github.com/Physis-AI/PhysisServe.git"

Save the following as generate.py and run python generate.py. Adjust pipeline_parallel_size to your available GPUs and memory before running; 1 below is an API example, not a single-GPU memory guarantee.

import imageio.v3 as iio
from physisserve import PhysisServe, SamplingParams


def main():
    model = PhysisServe(
        "Physis-AI/physisserve-wan2p1_1p3b-same_step-sdv2",
        pipeline_parallel_size=1,
    )
    sampling_params = SamplingParams(mode="offline_decode", seed=0)
    prompts = ["A corgi running along the beach at sunset."]
    outputs = model.generate(prompts, sampling_params)

    for index, output in enumerate(outputs):
        iio.imwrite(
            f"video-{index}.mp4",
            output["video"].numpy(),
            fps=output["fps"],
            codec="libx264",
            pixelformat="yuv420p",
            macro_block_size=None,
            output_params=["-movflags", "+faststart"],
        )


if __name__ == "__main__":
    main()

offline_decode saves latents under a separate directory in ./latents for each call, waits for all streams to finish denoising, and then decodes them. Set SamplingParams(latent_dir="your-directory", mode="offline_decode") to change the save location. The example writes playable MP4 files; generate() itself does not write MP4s.

A single prompt string or a list of prompts uses the same API. Multiple prompts create separate streams and increase memory demand.

Acknowledgments

We thank StreamDiffusionV2 for the autoregressive model weights, the Wan team for the base model, and the Diffusers contributors for the model components.

Downloads last month
25
Safetensors
Model size
1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including Physis-AI/physisserve-wan2p1_1p3b-same_step-sdv2