Views
No views yet
UNetSpatioTemporalConditionModel.
1from diffusers import UNetSpatioTemporalConditionModel, StableVideoDiffusionPipeline
2import torch
3from PIL import Image
4
5model_id = 'genex-world/GenEx-World-Explorer'
6
7# Load the custom UNet
8unet = UNetSpatioTemporalConditionModel.from_pretrained(
9 model_id,
10 subfolder='unet',
11 torch_dtype=torch.float16,
12 low_cpu_mem_usage=True,
13)
14
15# Load the full pipeline with custom UNet
16pipe = StableVideoDiffusionPipeline.from_pretrained(
17 model_id,
18 unet=unet,
19 low_cpu_mem_usage=True,
20 torch_dtype=torch.float16,
21 local_files_only=True,
22).to('cuda')
23
24# Explore the world!
25image = Image.open('example.png').resize((1024, 576), Image.BICUBIC).convert('RGB')
26
27generator = torch.manual_seed(-1)
28with torch.inference_mode():
29 frames = self.pipe(image,
30 num_frames=25,
31 width=1024,
32 height=576,
33 decode_chunk_size=8, generator=generator, motion_bucket_id=127, fps=7, num_inference_steps=30, noise_aug_strength=0.02).frames[0]diffusers>=0.33.1
transformers
numpy
pillow@misc{lu2025genexgeneratingexplorableworld,
title={GenEx: Generating an Explorable World},
author={Taiming Lu and Tianmin Shu and Junfei Xiao and Luoxin Ye and Jiahao Wang and Cheng Peng and Chen Wei and Daniel Khashabi and Rama Chellappa and Alan Yuille and Jieneng Chen},
year={2025},
eprint={2412.09624},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2412.09624},
}