Spaces:
Running
Running
Commit
·
9ff2a5b
1
Parent(s):
a935c47
update serve
Browse files- model/model_worker.py +51 -51
model/model_worker.py
CHANGED
|
@@ -63,60 +63,60 @@ class HuggingfaceApiWorker(BaseModelWorker):
|
|
| 63 |
model_api,
|
| 64 |
)
|
| 65 |
|
| 66 |
-
class PointE_Worker(BaseModelWorker):
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
class TriplaneGaussian(BaseModelWorker):
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
class LGM_Worker(BaseModelWorker):
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
|
| 89 |
-
|
| 90 |
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
class V3D_Worker(BaseModelWorker):
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
|
| 121 |
|
| 122 |
# model = 'LGM'
|
|
|
|
| 63 |
model_api,
|
| 64 |
)
|
| 65 |
|
| 66 |
+
# class PointE_Worker(BaseModelWorker):
|
| 67 |
+
# def __init__(self,
|
| 68 |
+
# model_name: str,
|
| 69 |
+
# i2s_model: bool,
|
| 70 |
+
# online_model: bool,
|
| 71 |
+
# model_api: str):
|
| 72 |
+
# super().__init__(model_name, i2s_model, online_model, model_api)
|
| 73 |
+
|
| 74 |
+
# class TriplaneGaussian(BaseModelWorker):
|
| 75 |
+
# def __init__(self, model_name: str, i2s_model: bool, online_model: bool, model_api: str = None):
|
| 76 |
+
# super().__init__(model_name, i2s_model, online_model, model_api)
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
# class LGM_Worker(BaseModelWorker):
|
| 80 |
+
# def __init__(self,
|
| 81 |
+
# model_name: str,
|
| 82 |
+
# i2s_model: bool,
|
| 83 |
+
# online_model: bool,
|
| 84 |
+
# model_api: str = "camenduru/lgm:d2870893aa115773465a823fe70fd446673604189843f39a99642dd9171e05e2",
|
| 85 |
+
# ):
|
| 86 |
+
# super().__init__(model_name, i2s_model, online_model, model_api)
|
| 87 |
+
# self.model_client = replicate.Client(api_token=REPLICATE_API_TOKEN)
|
| 88 |
|
| 89 |
+
# def inference(self, image):
|
| 90 |
|
| 91 |
+
# output = self.model_client.run(
|
| 92 |
+
# self.model_api,
|
| 93 |
+
# input={"input_image": image}
|
| 94 |
+
# )
|
| 95 |
+
# #=> .mp4 .ply
|
| 96 |
+
# return output[1]
|
| 97 |
+
|
| 98 |
+
# def render(self, shape):
|
| 99 |
+
# mesh = Gau2Mesh_client.run(shape)
|
| 100 |
+
|
| 101 |
+
# path_normal = ""
|
| 102 |
+
# cmd_normal = f"python -m ..kiuikit.kiui.render {mesh} --save {path_normal} \
|
| 103 |
+
# --wogui --H 512 --W 512 --radius 3 --elevation 0 --num_azimuth 40 --front_dir='+z' --mode normal"
|
| 104 |
+
# subprocess.run(cmd_normal, shell=True, check=True)
|
| 105 |
+
|
| 106 |
+
# path_rgb = ""
|
| 107 |
+
# cmd_rgb = f"python -m ..kiuikit.kiui.render {mesh} --save {path_rgb} \
|
| 108 |
+
# --wogui --H 512 --W 512 --radius 3 --elevation 0 --num_azimuth 40 --front_dir='+z' --mode rgb"
|
| 109 |
+
# subprocess.run(cmd_rgb, shell=True, check=True)
|
| 110 |
|
| 111 |
+
# return path_normal, path_rgb
|
| 112 |
+
|
| 113 |
+
# class V3D_Worker(BaseModelWorker):
|
| 114 |
+
# def __init__(self,
|
| 115 |
+
# model_name: str,
|
| 116 |
+
# i2s_model: bool,
|
| 117 |
+
# online_model: bool,
|
| 118 |
+
# model_api: str = None):
|
| 119 |
+
# super().__init__(model_name, i2s_model, online_model, model_api)
|
| 120 |
|
| 121 |
|
| 122 |
# model = 'LGM'
|