Spaces:
Running on Zero

gpwm-simulation / README.md
robertren1's picture
Drop anything: the Gradio app
c4ac8d1 verified
|
Raw History Blame Contribute Delete
1.87 kB

A newer version of the Gradio SDK is available: 6.33.0

Upgrade
metadata
title: GPWM Simulation
emoji: 🧸
colorFrom: gray
colorTo: blue
sdk: gradio
sdk_version: 6.30.0
python_version: '3.10'
app_file: app.py
pinned: false
short_description: Drop and drag photo objects; GPWM predicts the motion

GPWM Simulation

Objects made from photos are dropped and dragged on a table, and a generative particle world model (GPWM) predicts the next 2 seconds.

  • The objects: each was cut out of a photo and turned into a 3D shape (SAM 3, SAM 3D), then sampled into 1,024 particles, as the model's training data samples its objects.
  • The models: two specialists of the particle world model. The Free Fall model predicts drops; the Dragging model predicts pulls and lifts.
  • One Run: the model predicts 2 seconds of motion (48 frames), 16 frames at a time from the last 4, for every particle on the table.

How to use it

  1. Pick an object on the right (search, or show one material).
  2. Click the table to drop it. Scroll over the table to change the height; set its material and stiffness if you like.
  3. Press Run 2 s. Press it again while things still move.

Drag an object on the table to pull it, or select it and choose "Lift and drop". Log in to Hugging Face for more GPU time: visitors without a login get only a few runs a day.

For the maintainer

The app (app.py, demo/, web/) is public. The models and their code come from a private model repository that the Space reads at start: set the Space variable PWM_MODEL_REPO (for example <you>/pwm-drop-model) and the secret HF_TOKEN (a read token for that repository). Hardware: ZeroGPU.

Local run on a GPU machine, with a local copy of the model repository:

PWM_MODEL_DIR=/path/to/model_repo python app.py        # then open http://localhost:7860
python -m pytest tests -q                               # the world logic on the CPU