Spaces:
Running
on
Zero
Running
on
Zero
- apps/mv_models.py +20 -20
- gradio_app.py +2 -1
apps/mv_models.py
CHANGED
@@ -42,26 +42,26 @@ class GenMVImage(object):
|
|
42 |
)
|
43 |
self.crm_pipeline.set_seed(self.seed)
|
44 |
|
45 |
-
sys.path.append(f"{parent_dir}/apps/third_party/Wonder3D")
|
46 |
-
from diffusers import DiffusionPipeline # only tested on diffusers[torch]==0.19.3, may have conflicts with newer versions of diffusers
|
47 |
-
self.wonder3d_pipeline = DiffusionPipeline.from_pretrained(
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
)
|
52 |
-
self.wonder3d_pipeline.unet.enable_xformers_memory_efficient_attention()
|
53 |
-
self.wonder3d_pipeline.to(self.device)
|
54 |
-
self.wonder3d_pipeline.set_progress_bar_config(disable=True)
|
55 |
-
|
56 |
-
|
57 |
-
sys.path.append(f"{parent_dir}/apps/third_party/mvdream_diffusers")
|
58 |
-
from .third_party.mvdream_diffusers.pipeline_mvdream import MVDreamPipeline
|
59 |
-
self.mvdream_pipeline = MVDreamPipeline.from_pretrained(
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
)
|
64 |
-
self.mvdream_pipeline = self.mvdream_pipeline.to(self.device)
|
65 |
# self.imagedream_pipeline = MVDreamPipeline.from_pretrained(
|
66 |
# "ashawkey/imagedream-ipmv-diffusers", # remote weights
|
67 |
# torch_dtype=torch.float16,
|
|
|
42 |
)
|
43 |
self.crm_pipeline.set_seed(self.seed)
|
44 |
|
45 |
+
# sys.path.append(f"{parent_dir}/apps/third_party/Wonder3D")
|
46 |
+
# from diffusers import DiffusionPipeline # only tested on diffusers[torch]==0.19.3, may have conflicts with newer versions of diffusers
|
47 |
+
# self.wonder3d_pipeline = DiffusionPipeline.from_pretrained(
|
48 |
+
# 'flamehaze1115/wonder3d-v1.0', # or use local checkpoint './ckpts'
|
49 |
+
# custom_pipeline='flamehaze1115/wonder3d-pipeline',
|
50 |
+
# torch_dtype=torch.float16
|
51 |
+
# )
|
52 |
+
# self.wonder3d_pipeline.unet.enable_xformers_memory_efficient_attention()
|
53 |
+
# self.wonder3d_pipeline.to(self.device)
|
54 |
+
# self.wonder3d_pipeline.set_progress_bar_config(disable=True)
|
55 |
+
|
56 |
+
|
57 |
+
# sys.path.append(f"{parent_dir}/apps/third_party/mvdream_diffusers")
|
58 |
+
# from .third_party.mvdream_diffusers.pipeline_mvdream import MVDreamPipeline
|
59 |
+
# self.mvdream_pipeline = MVDreamPipeline.from_pretrained(
|
60 |
+
# "ashawkey/mvdream-sd2.1-diffusers", # remote weights
|
61 |
+
# torch_dtype=torch.float16,
|
62 |
+
# trust_remote_code=True,
|
63 |
+
# )
|
64 |
+
# self.mvdream_pipeline = self.mvdream_pipeline.to(self.device)
|
65 |
# self.imagedream_pipeline = MVDreamPipeline.from_pretrained(
|
66 |
# "ashawkey/imagedream-ipmv-diffusers", # remote weights
|
67 |
# torch_dtype=torch.float16,
|
gradio_app.py
CHANGED
@@ -141,7 +141,8 @@ if __name__=="__main__":
|
|
141 |
"Auto Remove Background": "Auto Remove Background",
|
142 |
"Original Image": "Original Image",
|
143 |
})
|
144 |
-
mvimg_model_config_list = ["CRM", "ImageDream", "Wonder3D"]
|
|
|
145 |
|
146 |
# for 3D latent set diffusion
|
147 |
ckpt_path = hf_hub_download(repo_id="wyysf/CraftsMan", filename="image-to-shape-diffusion/clip-mvrgb-modln-l256-e64-ne8-nd16-nl6/model.ckpt", repo_type="model")
|
|
|
141 |
"Auto Remove Background": "Auto Remove Background",
|
142 |
"Original Image": "Original Image",
|
143 |
})
|
144 |
+
# mvimg_model_config_list = ["CRM", "ImageDream", "Wonder3D"]
|
145 |
+
mvimg_model_config_list = ["CRM"]
|
146 |
|
147 |
# for 3D latent set diffusion
|
148 |
ckpt_path = hf_hub_download(repo_id="wyysf/CraftsMan", filename="image-to-shape-diffusion/clip-mvrgb-modln-l256-e64-ne8-nd16-nl6/model.ckpt", repo_type="model")
|