https://github.com/bytedance/mvdream
Multi-view Diffusion for 3D Generation
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Keywords
Repository
Multi-view Diffusion for 3D Generation
Basic Info
Statistics
- Stars: 908
- Watchers: 21
- Forks: 67
- Open Issues: 31
- Releases: 0
Topics
Metadata Files
README.md
MVDream
Yichun Shi, Peng Wang, Jianglong Ye, Long Mai, Kejie Li, Xiao Yang
| Project Page | 3D Generation | Paper | HuggingFace Demo (Coming) |
3D Generation
- This repository only includes the diffusion model and 2D image generation code of MVDream paper.
- For 3D Generation, please check MVDream-threestudio.
Installation
You can use the same environment as in Stable-Diffusion for this repo. Or you can set up the environment by installing the given requirements
bash
pip install -r requirements.txt
To use MVDream as a python module, you can install it by pip install -e . or:
python
pip install git+https://github.com/bytedance/MVDream
Model Card
Our models are provided on the Huggingface Model Page with the OpenRAIL license. | Model | Base Model | Resolution | | ----------- | ----------- | ----------- | | sd-v2.1-base-4view | Stable Diffusion 2.1 Base | 4x256x256 | | sd-v1.5-4view | Stable Diffusion 1.5 | 4x256x256 |
By default, we use the SD-2.1-base model in our experiments.
Note that you don't have to manually download the checkpoints for the following scripts.
Text-to-Image
You can simply generate multi-view images by running the following command:
bash
python scripts/t2i.py --text "an astronaut riding a horse"
We also provide a gradio script to try out with GUI:
bash
python scripts/gradio_app.py
Usage
Load the Model
We provide two ways to load the models of MVDream:
- Automatic: load the model config with model name and weights from huggingface.
python
from mvdream.model_zoo import build_model
model = build_model("sd-v2.1-base-4view")
- Manual: load the model with a config file and a checkpoint file.
python
from omegaconf import OmegaConf
from mvdream.ldm.util import instantiate_from_config
config = OmegaConf.load("mvdream/configs/sd-v2-base.yaml")
model = instantiate_from_config(config.model)
model.load_state_dict(torch.load("path/to/sd-v2.1-base-4view.th", map_location='cpu'))
Inference
Here is a simple example for model inference:
python
import torch
from mvdream.camera_utils import get_camera
model.eval()
model.cuda()
with torch.no_grad():
noise = torch.randn(4,4,32,32, device="cuda") # batch of 4x for 4 views, latent size 32=256/8
t = torch.tensor([999]*4, dtype=torch.long, device="cuda") # same timestep for 4 views
cond = {
"context": model.get_learned_conditioning([""]*4).cuda(), # text embeddings
"camera": get_camera(4).cuda(),
"num_frames": 4,
}
eps = model.apply_model(noise, t, cond=cond)
Acknowledgement
This repository is heavily based on Stable Diffusion. We would like to thank the authors of these work for publicly releasing their code.
Citation
bibtex
@article{shi2023MVDream,
author = {Shi, Yichun and Wang, Peng and Ye, Jianglong and Mai, Long and Li, Kejie and Yang, Xiao},
title = {MVDream: Multi-view Diffusion for 3D Generation},
journal = {arXiv:2308.16512},
year = {2023},
}
Owner
- Name: Bytedance Inc.
- Login: bytedance
- Kind: organization
- Location: Singapore
- Website: https://opensource.bytedance.com
- Twitter: ByteDanceOSS
- Repositories: 255
- Profile: https://github.com/bytedance
GitHub Events
Total
- Issues event: 3
- Watch event: 148
- Issue comment event: 3
- Pull request event: 1
- Fork event: 11
Last Year
- Issues event: 3
- Watch event: 148
- Issue comment event: 3
- Pull request event: 1
- Fork event: 11
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Yichun Shi | y****i@b****m | 8 |
| Ildar Idrisov | 3****v | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 38
- Total pull requests: 2
- Average time to close issues: 12 days
- Average time to close pull requests: about 13 hours
- Total issue authors: 32
- Total pull request authors: 2
- Average comments per issue: 1.42
- Average comments per pull request: 0.5
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 6
- Pull requests: 1
- Average time to close issues: 28 days
- Average time to close pull requests: N/A
- Issue authors: 5
- Pull request authors: 1
- Average comments per issue: 0.67
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- lizhiqi49 (2)
- No360201 (2)
- lihuining (2)
- Tangshitao (2)
- r530044129 (1)
- buaacyw (1)
- sonostrano (1)
- Huangkangxian (1)
- cat-state (1)
- youngstu (1)
- yanjk3 (1)
- StephanPan (1)
- zhengyuf (1)
- Anddy-pug (1)
- YuzhiChen001 (1)
Pull Request Authors
- aryansingh920 (2)
- ildar-idrisov (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- einops *
- gradio >=3.13.2
- imageio *
- imageio-ffmpe *
- omegaconf *
- open-clip-torch ==2.7.0
- opencv-python *
- transformers ==4.27.1
- xformers ==0.0.16
- einops *
- huggingface_hub *
- numpy *
- omegaconf *
- open-clip-torch *
- torch *
- tqdm *
- transformers *