Skip to content

RameezXD/Depthflow-Modal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌌 DepthFlow Modal Integration Overview

This repository provides a minimal Python interface to run DepthFlow β€” the soul of this project β€” on Modal's serverless GPU infrastructure.

Think of this as bringing the magic of Immersity AI to the open-source world β€” powered by DepthFlow, crafted by BrokenSource, and simply deployed via a script anyone can run.

All credit for the core functionality goes to DepthFlow, a remarkable open-source tool for image-to-video transformation using motion and depth inference. This repo merely wraps it in a Modal deployment for ease of use and scaling. Make sure to check his repo DepthFlow and his website Brokensrc ✨ Features

  • βš™οΈ Batch Processing β€” Convert multiple images into videos using DepthFlow with GPU acceleration.

  • 🌐 Web Interface β€” Gradio-powered GUI for easy access and real-time previews.

  • πŸ“¦ Serverless Scaling β€” Run on Modal’s on-demand infrastructure with parallel processing.

  • πŸ“ Logging β€” Track processed files and errors via structured logs.

πŸ”§ Requirements

  • Python 3.12

  • Modal account with CLI installed

  • NVIDIA GPU (T4 recommended for now)

πŸ“œ Scripts

  1. depthflow_bulk.py
  • Batch-converts PNG images in /data/images to MP4 videos using DepthFlow.

πŸ”Ή Usage

  • Place your PNG images in the /data/images directory.

Run the script:

  modal run depth_bulk.py
  • Processed videos will be saved in /data/videos.

βœ… Highlights

  • Automatically skips already processed images.

  • Logs success and errors to /data/logs.

  • Customizable hardware allocation (CPU, GPU, memory).

  1. depthflow_gui.py
  • Launches a Gradio web interface for DepthFlow.

πŸ”Ή Usage

Run the script:

modal serve depthflow_gui.py

βœ… Highlights

  • Real-time image-to-video interface.

  • Supports concurrent users and container scaling.

βš™οΈ Modal Configuration

  • Both scripts use a pre-built Modal container with the following:

  • depthflow==0.9.0.dev1

  • torch==2.6.0 (CUDA 12.4)

  • Tools: wget, git, ffmpeg

🀝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request for improvements or fixes. πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details. πŸ™ Acknowledgments

πŸŽ₯ DepthFlow β€” the soul of this project. Without it, there is no magic. Like Immersity AI, but open-source and written by BrokenSource.

☁️ Modal β€” for enabling seamless, serverless GPU computing.

About

Basic workflows for depthflow to run on Modal Lab runners.

Topics

Resources

License

Stars

Watchers

Forks

Languages