
Synthesises a short video clip from each String prompt using an in-process HuggingFace diffusers text-to-video pipeline; emits one Image per frame so the output stream forms the generated video.
Prompt-driven clip generation — a text file drives the prompt and frames are pushed to an HTTP image sink.
Live preview — prompts from a text file generate frames streamed to a browser.
model MUST be a diffusers text-to-video checkpoint whose `model_index.json` resolves to a text-to-video pipeline (DiffusionPipeline auto-selects the class). The default `ali-vilab/text-to-video-ms-1.7b` (ModelScopeT2V, Apache-2.0, ungated, ~6GB VRAM at fp16) resolves to `TextToVideoSDPipeline` at 256x256; `cerspense/zeroscope_v2_576w` also loads with this pipeline.
width and height MUST be multiples of 8. text-to-video-ms-1.7b is trained at 256x256; very large resolutions exhaust GPU memory because decoding the full clip is the memory peak.num_frames sets the clip length; text-to-video-ms-1.7b trains at 8 fps, so 16 frames is ~2s of playback. Higher counts raise VAE decode memory and latency.
num_inference_steps and guidance_scale shape quality: text-to-video-ms-1.7b's DDIM scheduler wants ~25-50 steps at guidance_scale ~9.0. Fewer steps trade quality for latency.
negative_prompt unset disables negative guidance; set it to steer generation away from artifacts.seed unset (`Nothing`) draws a fresh random latent per prompt; a `Just` value makes the clip deterministic for a fixed prompt and config.model is hot-swapped when its value changes at runtime — the pipeline is rebuilt and GPU memory reclaimed; the previous pipeline stays live if the new id fails to load. device and hf_token are captured once at startup.device `cuda` falls back to CPU when no CUDA backend is visible — inference continues at CPU speeds, which is impractical for diffusion video.Image. A non-empty prompt runs inference and emits num_frames frames; an empty prompt does not run inference but still emits exactly one black width x height frame, and any generation fault degrades to one black frame — the output stream never drops an input.
Automated release