Run this model with HF Jobs
Run shankartr123/multi-view-diffusion on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/shankartr123/multi-view-diffusion. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/shankartr123/multi-view-diffusion on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use shankartr123/multi-view-diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use shankartr123/multi-view-diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("shankartr123/multi-view-diffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Download run_mvdream.py from shankartr123/multi-view-diffusion: direct link, hf CLI and curl.
- Browser
- Download file 854 Bytes
-
https://huggingface.co/shankartr123/multi-view-diffusion/resolve/a3fbb445f32bfcd0fbc5ba253955633f0519a9e7/run_mvdream.py
- Command line
-
hf download hf://shankartr123/multi-view-diffusion@a3fbb445f32bfcd0fbc5ba253955633f0519a9e7/run_mvdream.py
-
curl -L -o run_mvdream.py https://huggingface.co/shankartr123/multi-view-diffusion/resolve/a3fbb445f32bfcd0fbc5ba253955633f0519a9e7/run_mvdream.py
854 Bytes
| import torch | |
| import kiui | |
| import numpy as np | |
| import argparse | |
| from pipeline import MVDreamPipeline | |
| pipe = MVDreamPipeline.from_pretrained( | |
| # "./weights_mvdream", # local weights | |
| 'ashawkey/mvdream-sd2.1-diffusers', # remote weights | |
| torch_dtype=torch.float16, | |
| trust_remote_code=True, | |
| ) | |
| pipe = pipe.to("cuda") | |
| parser = argparse.ArgumentParser(description="MVDream") | |
| parser.add_argument("prompt", type=str, default="a cute owl 3d model") | |
| args = parser.parse_args() | |
| for i in range(5): | |
| image = pipe(args.prompt, guidance_scale=5, num_inference_steps=30, elevation=0) | |
| grid = np.concatenate( | |
| [ | |
| np.concatenate([image[0], image[2]], axis=0), | |
| np.concatenate([image[1], image[3]], axis=0), | |
| ], | |
| axis=1, | |
| ) | |
| # kiui.vis.plot_image(grid) | |
| kiui.write_image(f'test_mvdream_{i}.jpg', grid) | |