P-Flow: Prompting Visual Effects Generation

Rui Zhao, Mike Zheng ShouCVPR 2026

TL;DR

P-Flow is a training-free framework that customizes complex, dynamic visual effects (like explosions, deflations, or crushing) in video generation models via test-time prompt optimization. By leveraging Vision-Language Models (VLMs) to iteratively refine text prompts and utilizing a novel motion-isolating noise prior, it achieves state-of-the-art visual effect generation without modifying the underlying model.

What Problem Does This Paper Address?

While modern video generation models excel at following simple text prompts, they struggle to produce nuanced, temporally evolving visual effects—such as an object crushing, dissolving, or exploding.

Traditional motion control methods typically rely on explicit trajectories (like camera paths or keypoints), which fail to capture these high-level semantic transformations. Conversely, while text prompts are ideal for describing complex semantics, humans find it incredibly difficult and time-consuming to manually engineer a single prompt that precisely dictates both the appearance and temporal progression of an intricate effect. Existing customization methods either require expensive model fine-tuning or fail to generalize across different scenes.

Figure 1. It is hard for humans to craft text prompts that precisely control video generation models to generate desired visual effects across diverse scenes, while P-Flow automatically refines prompts to achieve consistent and realistic visual effects.

Methods

P-Flow introduces a training-free, test-time optimization paradigm that treats the text prompt as an optimization variable, keeping the underlying video generator as a black box. The framework consists of three main pillars:

  1. Test-Time Prompt Optimization: A VLM (specifically Gemini 1.5 Pro) acts as the optimizer. It takes a composite video containing the reference effect and the currently generated video, analyzes the discrepancies in motion dynamics, and iteratively rewrites the text prompt to minimize the gap.
  2. Noise Prior Enhancement: Completely random noise across prompt optimization iterations causes chaotic, non-converging visual effects, while completely fixed noise restricts creative exploration. P-Flow extracts latent noise from the reference video using flow matching inversion. It then applies a two-stage Singular Value Decomposition (SVD) projection to filter out spatial appearance details (textures, backgrounds) while preserving the core temporal motion components, blending this filtered noise with fresh Gaussian noise to guide the generation stably.
  3. Historical Trajectory Maintenance: To prevent the VLM from making redundant changes, P-Flow tracks the optimization history. To save memory and visual token costs, it only feeds the VLM a compact visual context (the reference video, the previous iteration's video, and the current video) while maintaining the full history of text prompts and VLM analyses as compact text tokens.
Figure 2. Overview of the proposed P-Flow framework.

Datasets

The authors evaluate P-Flow on the Open-VFX dataset. This benchmark contains 675 high-quality videos spanning 15 diverse categories of dynamic visual effects (such as explode, deflate, and squish), along with 245 reference images used specifically for image-to-video (I2V) evaluation tasks.

Key Insights and Ideas

  • Text as a High-Level Control Signal: High-level semantic effects are better controlled through language than explicit physical trajectories, provided the language can be optimized automatically based on visual feedback.
  • Isolating the "Motion Essence": By applying SVD to inverted latent noise, the framework successfully decouples what the object looks like from how it moves, allowing the motion of an explosion or deflation to be transferred to entirely new subjects.
  • Token Efficiency through Decoupling: Passing entire video histories into a VLM quickly hits context window and computational limits. Decoupling short-term visual feedback from long-term textual reasoning history provides an efficient, scalable trade-off.

Key Results

P-Flow was evaluated using Wan 2.1 as its foundational video generation model and demonstrated substantial improvements over both general and specialized baselines:

  • Quantitative Superiority: P-Flow achieved state-of-the-art performance across both text-to-video (T2V) and image-to-video (I2V) tasks, yielding an overall FID-VID of 31.13, an FVD of 882.63, and a Dynamic Degree of 0.91 (significantly outperforming base models like Wan 2.1 and HunyuanVideo).
  • Beating Training-Based Models: It outperformed VFX Creator, a specialized model trained explicitly on the Open-VFX dataset, particularly in motion intensity and temporal coherence (Dynamic Degree of 0.94 vs 0.63 in I2V).
  • Human Preference: In user studies, P-Flow was overwhelmingly preferred over foundational baselines (e.g., an 80% preference rate over Wan 2.1 in I2V tasks).
Figure 3. Qualitative comparison on image-to-video generation with different visual effects. The prompts shown beneath each row represent the actual input to each model. As VFX Creator is optimized for short phrase inputs, such prompts are provided to ensure a fair and consistent evaluation.

Limitations and Future Work

Although P-Flow is training-free and highly modular, it relies on an iterative test-time optimization loop (running for 10 iterations in main experiments). Each iteration requires a full video generation pass (~69 seconds) plus VLM inference (~16.3 seconds), making the generation process computationally heavy and unsuitable for real-time applications.

The authors suggest that future work could focus on accelerating this feedback loop or finding ways to distill the VLM's optimized prompt knowledge into a faster, single-step mapping network.

Summary updated

BibTeX
@inproceedings{zhao2026p,
  author = {Rui Zhao and Mike Zheng Shou},
  title = {{P-Flow: Prompting Visual Effects Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=RlRFqwmWkb},
}
Figure