dylanebert HF staff commited on
Commit
84b9349
1 Parent(s): 0142f98

load pipelines withhout decorator

Browse files
Files changed (1) hide show
  1. app.py +16 -24
app.py CHANGED
@@ -5,30 +5,22 @@ from diffusers import DiffusionPipeline
5
  from PIL import Image
6
 
7
 
8
- @spaces.GPU
9
- def load_text_pipeline():
10
- # Text-to-Multi-View Diffusion pipeline
11
- return DiffusionPipeline.from_pretrained(
12
- "ashawkey/mvdream-sd2.1-diffusers",
13
- custom_pipeline="dylanebert/multi_view_diffusion",
14
- torch_dtype=torch.float16,
15
- trust_remote_code=True,
16
- ).to("cuda")
17
-
18
-
19
- @spaces.GPU
20
- def load_image_pipeline():
21
- # Image-to-Multi-View Diffusion pipeline
22
- return DiffusionPipeline.from_pretrained(
23
- "ashawkey/imagedream-ipmv-diffusers",
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):