Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
84b9349
1
Parent(s):
0142f98
load pipelines withhout decorator
Browse files
app.py
CHANGED
@@ -5,30 +5,22 @@ from diffusers import DiffusionPipeline
|
|
5 |
from PIL import Image
|
6 |
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
custom_pipeline="dylanebert/multi_view_diffusion",
|
25 |
-
torch_dtype=torch.float16,
|
26 |
-
trust_remote_code=True,
|
27 |
-
).to("cuda")
|
28 |
-
|
29 |
-
|
30 |
-
text_pipeline = load_text_pipeline()
|
31 |
-
image_pipeline = load_image_pipeline()
|
32 |
|
33 |
|
34 |
def create_image_grid(images):
|
|
|
5 |
from PIL import Image
|
6 |
|
7 |
|
8 |
+
# Text-to-Multi-View Diffusion pipeline
|
9 |
+
text_pipeline = DiffusionPipeline.from_pretrained(
|
10 |
+
"ashawkey/mvdream-sd2.1-diffusers",
|
11 |
+
custom_pipeline="dylanebert/multi_view_diffusion",
|
12 |
+
torch_dtype=torch.float16,
|
13 |
+
trust_remote_code=True,
|
14 |
+
).to("cuda")
|
15 |
+
|
16 |
+
|
17 |
+
# Image-to-Multi-View Diffusion pipeline
|
18 |
+
image_pipeline = DiffusionPipeline.from_pretrained(
|
19 |
+
"ashawkey/imagedream-ipmv-diffusers",
|
20 |
+
custom_pipeline="dylanebert/multi_view_diffusion",
|
21 |
+
torch_dtype=torch.float16,
|
22 |
+
trust_remote_code=True,
|
23 |
+
).to("cuda")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
|
26 |
def create_image_grid(images):
|