Instructions to use tedlasai/learn2refocus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use tedlasai/learn2refocus with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("tedlasai/learn2refocus", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
Add model card and metadata
#1
by nielsr HF Staff - opened
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: image-to-video
|
| 3 |
+
library_name: diffusers
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Generating the Past, Present and Future from a Motion-Blurred Image
|
| 7 |
+
|
| 8 |
+
This repository contains the model weights for the paper [Generating the Past, Present and Future from a Motion-Blurred Image](https://huggingface.co/papers/2512.19817).
|
| 9 |
+
|
| 10 |
+
[**Project Page**](https://blur2vid.github.io) | [**GitHub Repository**](https://github.com/tedlasai/blur2vid) | [**Gradio Demo**](https://huggingface.co/spaces/tedlasai/blur2vid)
|
| 11 |
+
|
| 12 |
+
## Summary
|
| 13 |
+
What can a motion-blurred image reveal about a scene's past, present, and future? This work repurposes a pre-trained video diffusion model to recover videos revealing complex scene dynamics during the moment of capture and predicting what might have occurred immediately in the past or future. The approach is robust, generalizes to in-the-wild images, and supports downstream tasks such as recovering camera trajectories and object motion.
|
| 14 |
+
|
| 15 |
+
## Sample Usage
|
| 16 |
+
To run inference on your own images, please follow the setup instructions in the [official GitHub repository](https://github.com/tedlasai/blur2vid). You can run the model using the following command:
|
| 17 |
+
|
| 18 |
+
```bash
|
| 19 |
+
python inference.py --image_path assets/dummy_image.png --output_path output/
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
## Citation
|
| 23 |
+
If you use this model or code in your research, please cite:
|
| 24 |
+
|
| 25 |
+
```bibtex
|
| 26 |
+
@article{Tedla2025Blur2Vid,
|
| 27 |
+
title = {Generating the Past, Present, and Future from a Motion-Blurred Image},
|
| 28 |
+
author = {Tedla, SaiKiran and Zhu, Kelly and Canham, Trevor and Taubner, Felix and Brown, Michael and Kutulakos, Kiriakos and Lindell, David},
|
| 29 |
+
journal = {ACM Transactions on Graphics},
|
| 30 |
+
year = {2025},
|
| 31 |
+
note = {SIGGRAPH Asia.}
|
| 32 |
+
}
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Contact
|
| 36 |
+
For questions or issues, please reach out through the [project page](https://blur2vid.github.io) or contact [Sai Tedla](mailto:tedlasai@gmail.com).
|