8000 GitHub - ZiYang-xie/WorldGen: ๐ŸŒ WorldGen - Generate Any 3D Scene in Seconds
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ZiYang-xie/WorldGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

48 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

WorldGen: Generate Any 3D Scene in Seconds

logo

๐Ÿ“„ Project Page Hugging Face Model Badge GitHub Stars

Author ๐Ÿ‘จโ€๐Ÿ’ป: Ziyang Xie @ Manifolds-AI
Contact Email ๐Ÿ“ง: ziyangxie01@gmail.com
Feel free to contact me for any questions or collaborations!

๐ŸŒŸ Introduction

๐ŸŒ WorldGen can generate 3D scenes in seconds from text prompts and images. It is a powerful tool for creating 3D environments and scenes for games, simulations, robotics, and virtual reality applications.

  • Instant 3D Generation โšก๏ธ : Create full 3D scenes from input data in seconds
  • 360ยฐ Free Exploration ๐Ÿงญ : WorldGen supports free 360ยฐ consistent exploration of the generated 3D scene with loop closure.
  • Diverse Scenes Support ๐ŸŒˆ : WorldGen supports both indoor and outdoor scenes, both realistic and unrealistic scenes in any style.
  • Flexible Rendering ๐Ÿ“ธ : WorldGen supports rendering at any resolution with any camera setting and trajectory in real-time.

Two lines of code to generate a 3D scene in seconds

# Use our API to generate a 3D scene
worldgen = WorldGen()
worldgen.generate_world("<TEXT PROMPT to describe the scene>")

Text-to-Scene Generation

demo demo
demo demo

Image-to-Scene Generation

demo ย  demo
demo ย  demo

News and TODOs

  • 05.10.2025 ๐Ÿ”ฅ Add support for low-vram generation (Only use ~10GB VRAM for generation).
  • 04.26.2025 ๐Ÿ“„ New Relase a project page for WorldGen
  • 04.22.2025 ๐Ÿก Add support for mesh scene generation (Should give better results than splat)
  • 04.21.2025 ๐ŸŽ‰ Opensource the WorldGen codebase
  • 04.19.2025 ๐Ÿ–ผ๏ธ Add support for image-to-scene generation
  • 04.17.2025 ๐Ÿ“ Add support for text-to-scene generation
  • ๐Ÿƒ๐Ÿปโ€โ™€๏ธ Release a better lora checkpoint.
  • Release technical report and video
  • Support higher resolution generation (e.g., 1080P, currently limited by computational resources)
  • Release huggingface demo.
  • Support better background inpainting (Invisible region inpainting)

๐Ÿ“ฆ Installation

Getting started with WorldGen is simple!

# Clone the repository 
git clone https://github.com/ZiYang-xie/WorldGen.git
cd WorldGen

# Create a new conda environment
conda create -n worldgen python=3.11
conda activate worldgen

# Install torch and torchvision (with GPU support)
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128


# Install worldgen
pip install .

๐ŸŽฎ Quick Start / Usage

WorldGen API

Quick start with WorldGen (mode in t2s or i2s) and generate your first 3D scene in seconds:

  • ๐Ÿ“ Text to Scene: Generate a 3D scene from a text prompt
# Example using the Python API
from worldgen import WorldGen
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

worldgen = WorldGen(mode="t2s", device=device, low_vram=False) # Set low_vram to True if your GPU VRAM is less than 24GB.
splat = worldgen.generate_world("<TEXT PROMPT to describe the scene>")
splat.save("path/to/your/output.ply") # Save splat file as a .ply file, which can be loaded and visualized using a standard gaussian splatting viewer
  • ๐Ÿ–ผ๏ธ Image to Scene: Generate a 3D scene from an image
worldgen = WorldGen(mode="i2s", device=device, low_vram=False) # Set low_vram to True if your GPU VRAM is less than 24GB.
image = Image.open("path/to/your/image.jpg")
splat = worldgen.generate_world(
    image=image,
    prompt="<Optional: TEXT PROMPT to describe the image and the scene>",
)
  • ๐Ÿก Generate a 3D scene in mesh mode
mesh = worldgen.generate_world("<TEXT PROMPT to describe the scene>", return_mesh=True)
o3d.io.write_triangle_mesh("path/to/your/output.ply", mesh) # Save mesh as a .ply file

Tip

We also support background inpainting for better scene generation, but it's currently an experimental feature, which may not work for all scenes.
It can be enabled by setting WorldGen(inpaint_bg=True).

# If want to use background inpainting feature, install iopaint
pip install iopaint --no-dependencies

๐Ÿ•น๏ธ Demo with 3D Scene Visualization

We provide a demo script to help you quickly get started and visualize the 3D scene in a web browser. The script is powered by Viser.

# Generate a 3D scene from a text prompt
python demo.py -p "A beautiful landscape with a river and mountains"

# Generate a 3D scene from an image
python demo.py -i "path/to/your/image.jpg" -p "<Optional: TEXT PROMPT to describe the scene>"

# ๐Ÿ”ฅ New feature: Generate a 3D scene in mesh mode
# Make sure you installed my customized viser to correctly visualize the mesh without backface culling
# pip install git+https://github.com/ZiYang-xie/viser.git

python demo.py -p "A beautiful landscape with a river and mountains" --return_mesh

After running the demo script, A local viser server will be launched at http://localhost:8080, where you can explore the generated 3D scene in real-time.

Free-viewpoint Exploration in 3D Scene

demo demo

Note

WorldGen internally support generating a 3D scene from a 360ยฐ panorama image ๐Ÿ“ธ, which related to how WorldGen works: You can try it out if you happen to have a 360ยฐ panorama (equirectangular) image. Aspect ratio of the panorama image should be 2:1.

 pano_image = Image.open("path/to/your/pano_image.jpg")
 splat = worldgen._generate_world(pano_image=pano_image)

โญ๏ธ Star History

Give a star to WorldGen if you like it! Star History Chart

๐Ÿ“š Citation

If you find this project useful, please consider citing it as follows:

@misc{worldgen2025ziyangxie,
  author = {Ziyang Xie},
  title = {WorldGen: Generate Any 3D Scene in Seconds},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/ZiYang-xie/WorldGen}},
}

๐Ÿค Acknowledgements

This project is built on top of the follows, please consider citing them if you find them useful:

Some of the core methods and ideas in this project are inspired by the following projects, special thanks to them:

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0