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
Hi! I'm Niels from the community science team at Hugging Face. I noticed this model repository was missing a model card and relevant metadata.
This PR adds:
- Metadata: Including the
image-to-videopipeline tag and thediffuserslibrary name to improve discoverability and enable automated code snippets. - Model Description: A brief summary of the research and links to the paper, project page, and official GitHub repository.
- Sample Usage: A code snippet based on the official GitHub README for running inference.
- Citation: The official BibTeX citation for this work.
Please let me know if you'd like any adjustments!
The info you used was for another repo. I have just put in my own simple readme that links to the project page.
Hi, thanks. Any reason why it was wrong? I found it based on the README here: https://github.com/tedlasai/blur2vid
Both SIGGRAPH papers by the same author (me). So I understand they are easy to confuse. Even I confuse them myself haha
Oh ok. I saw the "checkpoints" section here: https://raw.githubusercontent.com/tedlasai/blur2vid/refs/heads/main/README.md links to the learn2refocus model, I guess that paper will have different checkpoints
Oops, thats me confusing them ... Sorry, I'll fix that.
For that you can email us as explained here: https://huggingface.co/docs/hub/en/storage-limits#sharing-large-datasets-on-the-hub