SynLayers commited on
Commit
917ee67
·
verified ·
1 Parent(s): fa505df

Upload demo/README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. demo/README.md +63 -0
demo/README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: SynLayers
3
+ emoji: "🧩"
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ python_version: "3.10"
8
+ app_file: app.py
9
+ suggested_hardware: a100-large
10
+ startup_duration_timeout: 2h
11
+ short_description: "GPU Space for SynLayers real-world layer decomposition"
12
+ models:
13
+ - SynLayers/Bbox-caption-8b
14
+ - SynLayers/synlayers
15
+ pinned: false
16
+ ---
17
+
18
+ # SynLayers Demo
19
+
20
+ This folder now contains a unified real-world inference demo:
21
+
22
+ 1. `demo/infer` runs the fixed-prompt VLM caption + bbox detector.
23
+ 2. `infer/infer.py` runs SynLayers decomposition with `infer/infer.yaml`.
24
+ 3. `demo/real_world_pipeline.py` stitches the two stages together for one uploaded image.
25
+ 4. `demo/app.py` provides a Gradio interface that can be used locally or adapted for a Hugging Face Space.
26
+
27
+ ## Model Repos
28
+
29
+ The Space now expects two separate model repositories:
30
+
31
+ ```text
32
+ SYNLAYERS_BBOX_MODEL_REPO=SynLayers/Bbox-caption-8b
33
+ SYNLAYERS_STAGE2_MODEL_REPO=SynLayers/synlayers
34
+ ```
35
+
36
+ This lets the Space:
37
+
38
+ - load the bbox detector from `SynLayers/Bbox-caption-8b`
39
+ - load the Stage 2 SynLayers checkpoints from `SynLayers/synlayers`
40
+
41
+ `SynLayers/Bbox-caption-8b` should only host the Stage 1 bbox-caption model.
42
+ `SynLayers/synlayers` should host the Stage 2 decomposition checkpoints and runtime assets.
43
+
44
+ ## Hardware
45
+
46
+ The Space code supports either a dedicated GPU Space or ZeroGPU. Hardware is still chosen in the Hugging Face Space settings.
47
+
48
+ ## Local Run
49
+
50
+ From the `SynLayers` root:
51
+
52
+ ```bash
53
+ python demo/app.py
54
+ ```
55
+
56
+ Or run the unified CLI directly:
57
+
58
+ ```bash
59
+ python demo/real_world_pipeline.py \
60
+ --image "/path/to/your/image.png"
61
+ ```
62
+
63
+