Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update GSO subset builder
Browse files- README.md +2 -1
- app.py +1 -1
- static/app.js +1 -1
README.md
CHANGED
|
@@ -14,6 +14,7 @@ hf_oauth_expiration_minutes: 4320
|
|
| 14 |
datasets:
|
| 15 |
- hugging-3d/gso-objects
|
| 16 |
- hugging-3d/smithsonian-3d-objects
|
|
|
|
| 17 |
- hugging-3d/nasa-3d-objects
|
| 18 |
- hugging-3d/google-scanned-objects
|
| 19 |
- suvadityamuk/gso-footwear-trellis2-latents
|
|
@@ -46,7 +47,7 @@ Subsets are shareable links.
|
|
| 46 |
|
| 47 |
| variable | default | meaning |
|
| 48 |
|---|---|---|
|
| 49 |
-
| `COLLECTIONS` | GSO, Smithsonian, NASA | comma-separated collection repos (format: `gso_browser/collection3d/format.py`); the first is the default |
|
| 50 |
| `LATENTS_REPOS` | none | extra `trellis2-prep` repos, added to each collection's own `latents_repos` |
|
| 51 |
| `ZIP_MAX_GB` | `2` | largest zip the Space builds; bigger subsets use the script or a Hub export |
|
| 52 |
| `EXPORT_MAX_GB` | `30` | largest Hub export |
|
|
|
|
| 14 |
datasets:
|
| 15 |
- hugging-3d/gso-objects
|
| 16 |
- hugging-3d/smithsonian-3d-objects
|
| 17 |
+
- hugging-3d/abo-3d-objects
|
| 18 |
- hugging-3d/nasa-3d-objects
|
| 19 |
- hugging-3d/google-scanned-objects
|
| 20 |
- suvadityamuk/gso-footwear-trellis2-latents
|
|
|
|
| 47 |
|
| 48 |
| variable | default | meaning |
|
| 49 |
|---|---|---|
|
| 50 |
+
| `COLLECTIONS` | GSO, Smithsonian, ABO, NASA | comma-separated collection repos (format: `gso_browser/collection3d/format.py`); the first is the default |
|
| 51 |
| `LATENTS_REPOS` | none | extra `trellis2-prep` repos, added to each collection's own `latents_repos` |
|
| 52 |
| `ZIP_MAX_GB` | `2` | largest zip the Space builds; bigger subsets use the script or a Hub export |
|
| 53 |
| `EXPORT_MAX_GB` | `30` | largest Hub export |
|
app.py
CHANGED
|
@@ -34,7 +34,7 @@ except ImportError: # running from a checkout
|
|
| 34 |
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "trainer_space"))
|
| 35 |
import jobs as T
|
| 36 |
|
| 37 |
-
DEFAULT_COLLECTIONS = "hugging-3d/gso-objects,hugging-3d/smithsonian-3d-objects,hugging-3d/nasa-3d-objects"
|
| 38 |
COLLECTION_REPOS = [r for r in os.environ.get("COLLECTIONS", DEFAULT_COLLECTIONS).split(",") if r]
|
| 39 |
EXTRA_LATENTS = [r for r in os.environ.get("LATENTS_REPOS", "").split(",") if r] # appended to every manifest's list
|
| 40 |
LOCAL_DIR = os.environ.get("LOCAL_OBJECTS_DIR")
|
|
|
|
| 34 |
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "trainer_space"))
|
| 35 |
import jobs as T
|
| 36 |
|
| 37 |
+
DEFAULT_COLLECTIONS = "hugging-3d/gso-objects,hugging-3d/smithsonian-3d-objects,hugging-3d/abo-3d-objects,hugging-3d/nasa-3d-objects"
|
| 38 |
COLLECTION_REPOS = [r for r in os.environ.get("COLLECTIONS", DEFAULT_COLLECTIONS).split(",") if r]
|
| 39 |
EXTRA_LATENTS = [r for r in os.environ.get("LATENTS_REPOS", "").split(",") if r] # appended to every manifest's list
|
| 40 |
LOCAL_DIR = os.environ.get("LOCAL_OBJECTS_DIR")
|
static/app.js
CHANGED
|
@@ -240,7 +240,7 @@ function renderGrid() {
|
|
| 240 |
const sibs = S.groups.get(r.group).length;
|
| 241 |
const inB = S.basket.has(r.object_id);
|
| 242 |
return `<article class="tile${inB ? " in" : ""}" data-id="${esc(r.object_id)}" data-i="${i}">
|
| 243 |
-
<button class="open" aria-label="View ${esc(pretty(r.name))} in 3D"><img loading="lazy" src="${tileUrl(r.object_id)}" alt=""></button>
|
| 244 |
<button class="add" aria-pressed="${inB}" aria-label="${inB ? "Remove from" : "Add to"} your dataset" title="${inB ? "Remove from" : "Add to"} your dataset">${inB ? "✓" : "+"}</button>
|
| 245 |
<div class="badges">${sibs > 1 ? `<span class="badge" title="${sibs} ${variantWord()} of the same object">${sibs} ${variantWord()}</span>` : ""}${r.latents_repo && !S.allLatents ? `<span class="badge lat" title="Already preprocessed for TRELLIS.2">ready to train</span>` : ""}</div>
|
| 246 |
<div class="cap"><span class="nm">${esc(pretty(r.name))}</span><span class="sub">${esc(r.category || "Other")}${S.cfg.real_size && r.max_dim_cm ? ` · ${Math.round(r.max_dim_cm)} cm` : ""}</span></div>
|
|
|
|
| 240 |
const sibs = S.groups.get(r.group).length;
|
| 241 |
const inB = S.basket.has(r.object_id);
|
| 242 |
return `<article class="tile${inB ? " in" : ""}" data-id="${esc(r.object_id)}" data-i="${i}">
|
| 243 |
+
<button class="open" aria-label="View ${esc(pretty(r.name))} in 3D"><img loading="lazy" src="${tileUrl(r.object_id)}" alt="" onerror="this.style.visibility='hidden'"></button>
|
| 244 |
<button class="add" aria-pressed="${inB}" aria-label="${inB ? "Remove from" : "Add to"} your dataset" title="${inB ? "Remove from" : "Add to"} your dataset">${inB ? "✓" : "+"}</button>
|
| 245 |
<div class="badges">${sibs > 1 ? `<span class="badge" title="${sibs} ${variantWord()} of the same object">${sibs} ${variantWord()}</span>` : ""}${r.latents_repo && !S.allLatents ? `<span class="badge lat" title="Already preprocessed for TRELLIS.2">ready to train</span>` : ""}</div>
|
| 246 |
<div class="cap"><span class="nm">${esc(pretty(r.name))}</span><span class="sub">${esc(r.category || "Other")}${S.cfg.real_size && r.max_dim_cm ? ` · ${Math.round(r.max_dim_cm)} cm` : ""}</span></div>
|