SynLayers commited on
Commit
331f981
·
verified ·
1 Parent(s): 090a74d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +37 -0
README.md CHANGED
@@ -31,6 +31,43 @@ The full SynLayers system has two stages:
31
 
32
  This repository is intended for the SynLayers decomposition pipeline. It is not meant to be loaded as a single generic `DiffusionPipeline(prompt)` model.
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  For more details, please check our paper:
35
  [https://arxiv.org/abs/2605.15167](https://arxiv.org/abs/2605.15167)
36
 
 
31
 
32
  This repository is intended for the SynLayers decomposition pipeline. It is not meant to be loaded as a single generic `DiffusionPipeline(prompt)` model.
33
 
34
+ ## Stage 2 Inference
35
+
36
+ The standalone Stage 2 entrypoint is:
37
+
38
+ - `infer/infer.py`
39
+ - `infer/infer.yaml`
40
+
41
+ Stage 2 expects images plus a JSONL file containing the whole-image caption and bounding boxes. The easiest way to get those inputs is to run Stage 1 first with [`SynLayers/Bbox-caption-8b`](https://huggingface.co/SynLayers/Bbox-caption-8b), or use the public Space for the full two-stage pipeline.
42
+
43
+ After preparing your inputs, update these fields in `infer/infer.yaml`:
44
+
45
+ ```yaml
46
+ data_dir: "path/to/your/work_dir"
47
+ image_dir: "path/to/your/images"
48
+ test_jsonl: "path/to/caption_bbox_infer.jsonl"
49
+ save_dir: "path/to/save/results"
50
+ ```
51
+
52
+ Then run:
53
+
54
+ ```bash
55
+ python infer/infer.py \
56
+ --config_path infer/infer.yaml
57
+ ```
58
+
59
+ The default checkpoint paths in `infer/infer.yaml` are repo-relative and point to the assets in this repository:
60
+
61
+ ```yaml
62
+ pretrained_model_name_or_path: "SynLayers_checkpoints/FLUX.1-dev"
63
+ pretrained_adapter_path: "SynLayers_checkpoints/FLUX.1-dev-Controlnet-Inpainting-Alpha"
64
+ lora_ckpt: "SynLayers_ckpt/step_120000/transformer"
65
+ layer_ckpt: "SynLayers_ckpt/step_120000"
66
+ adapter_lora_dir: "SynLayers_ckpt/step_120000/adapter"
67
+ ```
68
+
69
+ For most users, the public Space is the recommended interface because it runs both Stage 1 and Stage 2 in one workflow.
70
+
71
  For more details, please check our paper:
72
  [https://arxiv.org/abs/2605.15167](https://arxiv.org/abs/2605.15167)
73