xinjie.wang commited on
Commit
38358b4
·
1 Parent(s): 449a72e
Files changed (1) hide show
  1. common.py +6 -4
common.py CHANGED
@@ -17,6 +17,8 @@ from kolors.pipelines.pipeline_stable_diffusion_xl_chatglm_256 import (
17
  from kolors.pipelines.pipeline_stable_diffusion_xl_chatglm_256_ipadapter import ( # noqa
18
  StableDiffusionXLPipeline as StableDiffusionXLPipelineIP,
19
  )
 
 
20
  from PIL import Image
21
  from tqdm import tqdm
22
  from asset3d_gen.data.backproject_v2 import entrypoint as backproject_api
@@ -44,9 +46,10 @@ from asset3d_gen.validators.quality_checkers import (
44
  )
45
  from asset3d_gen.validators.urdf_convertor import URDFGenerator, zip_files
46
 
47
- current_file_path = os.path.abspath(__file__)
48
- current_dir = os.path.dirname(current_file_path)
49
- sys.path.append(os.path.join(current_dir, ""))
 
50
  from thirdparty.TRELLIS.trellis.pipelines import TrellisImageTo3DPipeline
51
  from thirdparty.TRELLIS.trellis.renderers.mesh_renderer import MeshRenderer
52
  from thirdparty.TRELLIS.trellis.representations import (
@@ -58,7 +61,6 @@ from thirdparty.TRELLIS.trellis.utils.render_utils import (
58
  render_frames,
59
  yaw_pitch_r_fov_to_extrinsics_intrinsics,
60
  )
61
- import spaces
62
 
63
 
64
  logging.basicConfig(
 
17
  from kolors.pipelines.pipeline_stable_diffusion_xl_chatglm_256_ipadapter import ( # noqa
18
  StableDiffusionXLPipeline as StableDiffusionXLPipelineIP,
19
  )
20
+ import spaces
21
+
22
  from PIL import Image
23
  from tqdm import tqdm
24
  from asset3d_gen.data.backproject_v2 import entrypoint as backproject_api
 
46
  )
47
  from asset3d_gen.validators.urdf_convertor import URDFGenerator, zip_files
48
 
49
+ current_directory = os.getcwd()
50
+ if current_directory not in sys.path:
51
+ sys.path.insert(0, current_directory)
52
+
53
  from thirdparty.TRELLIS.trellis.pipelines import TrellisImageTo3DPipeline
54
  from thirdparty.TRELLIS.trellis.renderers.mesh_renderer import MeshRenderer
55
  from thirdparty.TRELLIS.trellis.representations import (
 
61
  render_frames,
62
  yaw_pitch_r_fov_to_extrinsics_intrinsics,
63
  )
 
64
 
65
 
66
  logging.basicConfig(