Instructions to use Physis-AI/physisserve-ltx2p5_22b-same_step-ls-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Physis-AI/physisserve-ltx2p5_22b-same_step-ls-dev with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Physis-AI/physisserve-ltx2p5_22b-same_step-ls-dev", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
PhysisServe — LTX-2.5 22B
A development release of LTX-2.5 22B with autoregressive video weights trained by Physis-AI for same-step noisy-KV inference. The ls-dev suffix identifies Physis-AI-trained weights.
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) | 960 × 544 |
| Output FPS | 24 |
| Denoising steps per chunk | 4 |
| First chunk | 3 latent frames |
| Each subsequent chunk | 1 latent frame |
| Chunks per generation, including the first | 14 |
| 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-ltx2p5_22b-same_step-ls-dev",
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 Lightricks for the base model and the Diffusers contributors for the model components.
- Downloads last month
- 17