Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
efa2e5d
1
Parent(s):
a607dd8
update
Browse files
embodied_gen/data/differentiable_render.py
CHANGED
@@ -505,7 +505,7 @@ def parse_args():
|
|
505 |
help="Text prompts for the rendering.",
|
506 |
)
|
507 |
|
508 |
-
args = parser.
|
509 |
|
510 |
if args.uuid is None and args.mesh_path is not None:
|
511 |
args.uuid = []
|
|
|
505 |
help="Text prompts for the rendering.",
|
506 |
)
|
507 |
|
508 |
+
args, unknown = parser.parse_known_args()
|
509 |
|
510 |
if args.uuid is None and args.mesh_path is not None:
|
511 |
args.uuid = []
|
embodied_gen/models/text_model.py
CHANGED
@@ -94,6 +94,7 @@ def build_text2img_ip_pipeline(
|
|
94 |
pipe.set_ip_adapter_scale([ref_scale])
|
95 |
|
96 |
pipe = pipe.to(device)
|
|
|
97 |
# pipe.enable_model_cpu_offload()
|
98 |
# pipe.enable_xformers_memory_efficient_attention()
|
99 |
# pipe.enable_vae_slicing()
|
|
|
94 |
pipe.set_ip_adapter_scale([ref_scale])
|
95 |
|
96 |
pipe = pipe.to(device)
|
97 |
+
pipe.image_encoder = pipe.image_encoder.to(device)
|
98 |
# pipe.enable_model_cpu_offload()
|
99 |
# pipe.enable_xformers_memory_efficient_attention()
|
100 |
# pipe.enable_vae_slicing()
|
embodied_gen/scripts/imageto3d.py
CHANGED
@@ -20,7 +20,7 @@ import logging
|
|
20 |
import os
|
21 |
import sys
|
22 |
from glob import glob
|
23 |
-
from shutil import copy, copytree
|
24 |
|
25 |
import numpy as np
|
26 |
import trimesh
|
@@ -294,6 +294,8 @@ if __name__ == "__main__":
|
|
294 |
|
295 |
# Organize the final result files
|
296 |
result_dir = f"{output_root}/result"
|
|
|
|
|
297 |
os.makedirs(result_dir, exist_ok=True)
|
298 |
copy(urdf_path, f"{result_dir}/{os.path.basename(urdf_path)}")
|
299 |
copytree(
|
|
|
20 |
import os
|
21 |
import sys
|
22 |
from glob import glob
|
23 |
+
from shutil import copy, copytree, rmtree
|
24 |
|
25 |
import numpy as np
|
26 |
import trimesh
|
|
|
294 |
|
295 |
# Organize the final result files
|
296 |
result_dir = f"{output_root}/result"
|
297 |
+
if os.path.exists(result_dir):
|
298 |
+
rmtree(result_dir, ignore_errors=True)
|
299 |
os.makedirs(result_dir, exist_ok=True)
|
300 |
copy(urdf_path, f"{result_dir}/{os.path.basename(urdf_path)}")
|
301 |
copytree(
|