update readme
Browse files
README.md
CHANGED
@@ -1,3 +1,54 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
---
|
4 |
+
# Unique3d-Normal-Diffuser Model Card
|
5 |
+
|
6 |
+
## Example
|
7 |
+
Note the input image is suppose to be **white background**.
|
8 |
+
```bash
|
9 |
+
import torch
|
10 |
+
import numpy as np
|
11 |
+
from PIL import Image
|
12 |
+
from pipeline import StableDiffusionImage2MVCustomPipeline
|
13 |
+
from diffusers import EulerAncestralDiscreteScheduler
|
14 |
+
|
15 |
+
# opts
|
16 |
+
seed = -1
|
17 |
+
generator = torch.Generator(device='cuda').manual_seed(-1)
|
18 |
+
forward_args = dict(
|
19 |
+
width=512,
|
20 |
+
height=512,
|
21 |
+
width_cond=512,
|
22 |
+
height_cond=512,
|
23 |
+
generator=generator,
|
24 |
+
guidance_scale=1.5,
|
25 |
+
num_inference_steps=30,
|
26 |
+
num_images_per_prompt=1,
|
27 |
+
)
|
28 |
+
|
29 |
+
# load
|
30 |
+
pipe = StableDiffusionImage2MVCustomPipeline.from_pretrained(
|
31 |
+
"Luffuly/unique3d-normal-diffuser",
|
32 |
+
torch_dtype=torch.bfloat16,
|
33 |
+
trust_remote_code=True,
|
34 |
+
).to("cuda")
|
35 |
+
|
36 |
+
# load image
|
37 |
+
image = Image.open('image.png').convert("RGB")
|
38 |
+
|
39 |
+
# forward
|
40 |
+
out = pipe(image, **forward_args).images
|
41 |
+
out[0].save(f"out.png")
|
42 |
+
```
|
43 |
+
|
44 |
+
## Citation
|
45 |
+
```bash
|
46 |
+
@misc{wu2024unique3d,
|
47 |
+
title={Unique3D: High-Quality and Efficient 3D Mesh Generation from a Single Image},
|
48 |
+
author={Kailu Wu and Fangfu Liu and Zhihan Cai and Runjie Yan and Hanyang Wang and Yating Hu and Yueqi Duan and Kaisheng Ma},
|
49 |
+
year={2024},
|
50 |
+
eprint={2405.20343},
|
51 |
+
archivePrefix={arXiv},
|
52 |
+
primaryClass={cs.CV}
|
53 |
+
}
|
54 |
+
```
|