Spaces:
Running
on
Zero
Running
on
Zero
Update app
Browse files
app.py
CHANGED
@@ -24,10 +24,10 @@ predictors = {}
|
|
24 |
|
25 |
# Available model versions
|
26 |
MODEL_VERSIONS = {
|
27 |
-
"v0.3": "yoso-normal-v0-3",
|
28 |
-
"v1.0": "yoso-normal-v1-0",
|
29 |
-
"v1.5": "yoso-normal-v1-5",
|
30 |
-
"v1.8.1": "yoso-normal-v1-8-1"
|
31 |
}
|
32 |
|
33 |
def load_predictor(version: str = "v1.8.1"):
|
@@ -148,27 +148,15 @@ def create_demo():
|
|
148 |
position=0.25,
|
149 |
)
|
150 |
|
151 |
-
# Model version info
|
152 |
-
with gr.Row():
|
153 |
-
gr.Markdown("""
|
154 |
-
**Model Version Information:**
|
155 |
-
- **v0.3**: Camera Ready Version
|
156 |
-
- **v1.0**: Improve stability, but poor sharpness
|
157 |
-
- **v1.5**: Enhanced performance and accuracy
|
158 |
-
- **v1.8.1**: Latest version with best sharpness (default)
|
159 |
-
|
160 |
-
*All models are precached and ready for instant switching.*
|
161 |
-
""")
|
162 |
-
|
163 |
# Examples section
|
164 |
if os.path.exists(os.path.join("files", "object")):
|
165 |
Examples(
|
166 |
fn=lambda img, ver: process_object(img, ver),
|
167 |
examples=sorted([
|
168 |
-
|
169 |
for name in os.listdir(os.path.join("files", "object"))
|
170 |
]),
|
171 |
-
inputs=[object_input
|
172 |
outputs=[object_output_slider],
|
173 |
cache_examples=False,
|
174 |
directory_name="examples_object",
|
|
|
24 |
|
25 |
# Available model versions
|
26 |
MODEL_VERSIONS = {
|
27 |
+
"v0.3: Camera Ready Version": "yoso-normal-v0-3",
|
28 |
+
"v1.0: NormalAnything Version": "yoso-normal-v1-0",
|
29 |
+
"v1.5: Best Balance": "yoso-normal-v1-5",
|
30 |
+
"v1.8.1: Best Sharpness": "yoso-normal-v1-8-1"
|
31 |
}
|
32 |
|
33 |
def load_predictor(version: str = "v1.8.1"):
|
|
|
148 |
position=0.25,
|
149 |
)
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
# Examples section
|
152 |
if os.path.exists(os.path.join("files", "object")):
|
153 |
Examples(
|
154 |
fn=lambda img, ver: process_object(img, ver),
|
155 |
examples=sorted([
|
156 |
+
os.path.join("files", "object", name)
|
157 |
for name in os.listdir(os.path.join("files", "object"))
|
158 |
]),
|
159 |
+
inputs=[object_input],
|
160 |
outputs=[object_output_slider],
|
161 |
cache_examples=False,
|
162 |
directory_name="examples_object",
|