update readme
Browse files
README.md
CHANGED
@@ -3,17 +3,28 @@ license: mit
|
|
3 |
---
|
4 |
# Unique3d-MVImage-Diffuser Model Card
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
## Example
|
7 |
-
Note the input image is
|
|
|
|
|
|
|
8 |
```bash
|
9 |
import torch
|
10 |
import numpy as np
|
11 |
from PIL import Image
|
12 |
from pipeline import StableDiffusionImage2MVCustomPipeline
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
"Luffuly/unique3d-mv-variation-diffuser",
|
17 |
torch_dtype=torch.float16,
|
18 |
trust_remote_code=True,
|
19 |
class_labels=torch.tensor(range(4)),
|
@@ -23,7 +34,7 @@ seed = -1
|
|
23 |
generator = torch.Generator(device='cuda').manual_seed(-1)
|
24 |
|
25 |
|
26 |
-
image = Image.open('
|
27 |
forward_args = dict(
|
28 |
width=256,
|
29 |
height=256,
|
@@ -37,12 +48,11 @@ forward_args = dict(
|
|
37 |
|
38 |
out = pipe(image, **forward_args).images
|
39 |
rgb_np = np.hstack([np.array(img) for img in out])
|
40 |
-
Image.fromarray(rgb_np).save(f"
|
41 |
|
42 |
```
|
43 |
|
44 |
-
|
45 |
-
please check:
|
46 |
|
47 |
## Citation
|
48 |
```bash
|
|
|
3 |
---
|
4 |
# Unique3d-MVImage-Diffuser Model Card
|
5 |
|
6 |
+
<div align="left">
|
7 |
+
<a href='LICENSE'><img src='https://img.shields.io/badge/license-MIT-yellow'></a>
|
8 |
+
<a href='https://wukailu.github.io/Unique3D'><img src='https://img.shields.io/badge/Project-Unique3D-green'></a>
|
9 |
+
<a href='https://huggingface.co/Luffuly/unique3d-normal-diffuser'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Normal-blue'></a>
|
10 |
+
<a href='https://huggingface.co/Luffuly/unique3d-mvimage-diffuser'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-MVImage-red'></a>
|
11 |
+
<br>
|
12 |
+
</div>
|
13 |
+
<br>
|
14 |
+
|
15 |
## Example
|
16 |
+
Note the input image is required to be **white background**.
|
17 |
+
|
18 |
+
![mv-boy](https://github.com/user-attachments/assets/65558519-dbfe-40de-ac13-5d78527541c5)
|
19 |
+
|
20 |
```bash
|
21 |
import torch
|
22 |
import numpy as np
|
23 |
from PIL import Image
|
24 |
from pipeline import StableDiffusionImage2MVCustomPipeline
|
25 |
|
26 |
+
pipe = Unique3dDiffusionPipeline.from_pretrained(
|
27 |
+
"Luffuly/unique3d-mvimage-diffuser",
|
|
|
28 |
torch_dtype=torch.float16,
|
29 |
trust_remote_code=True,
|
30 |
class_labels=torch.tensor(range(4)),
|
|
|
34 |
generator = torch.Generator(device='cuda').manual_seed(-1)
|
35 |
|
36 |
|
37 |
+
image = Image.open('data/boy.png')
|
38 |
forward_args = dict(
|
39 |
width=256,
|
40 |
height=256,
|
|
|
48 |
|
49 |
out = pipe(image, **forward_args).images
|
50 |
rgb_np = np.hstack([np.array(img) for img in out])
|
51 |
+
Image.fromarray(rgb_np).save(f"mv-boy.png")
|
52 |
|
53 |
```
|
54 |
|
55 |
+
|
|
|
56 |
|
57 |
## Citation
|
58 |
```bash
|