Ruolan Sun Claude Opus 4.8 commited on
Commit
3c37707
·
1 Parent(s): a525f5a

Fix demo: install from PyPI + correct model id and framing

Browse files

- requirements: install pgmap-align==1.5.2 from PyPI (was git+...@v1.2.0,
the source of the build error)
- app.py: SD1.5 model id runwayml/stable-diffusion-v1-5 (removed/401) ->
stable-diffusion-v1-5/stable-diffusion-v1-5
- de-claim NeurIPS acceptance / drop "anonymous"; BibTeX @inproceedings -> @misc ;
README PyPI line -> pip install pgmap-align

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Files changed (3) hide show
  1. README.md +8 -7
  2. app.py +4 -4
  3. requirements.txt +3 -3
README.md CHANGED
@@ -8,16 +8,16 @@ sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: true
10
  license: mit
11
- short_description: PG-MAP inference-time alignment (NeurIPS 2026)
12
  ---
13
 
14
- # PG-MAP Demo · NeurIPS 2026
15
 
16
  Interactive demo for **PG-MAP** (Preference-Guided Adaptive MAP) — a training-free framework that re-optimizes the conditioning $c$ and the latent $z_t$ at every denoising step. Supports SD 1.5, SDXL, and SD3.5-medium (UG-FM) backbones.
17
 
18
- - 🔗 **Paper** (NeurIPS 2026, anonymous): [github.com/sophialanlan/PG-MAP](https://github.com/sophialanlan/PG-MAP)
19
  - 🤗 **Custom diffusers pipelines**: [pg-map-sd15](https://huggingface.co/sophialan/pg-map-sd15) · [pg-map-sdxl](https://huggingface.co/sophialan/pg-map-sdxl) · [pg-map-sd3](https://huggingface.co/sophialan/pg-map-sd3)
20
- - 📦 **PyPI**: `pip install pg-map`
21
 
22
  ## Hardware
23
 
@@ -35,10 +35,11 @@ python app.py
35
  ## Citation
36
 
37
  ```bibtex
38
- @inproceedings{sun2026pgmap,
39
  title={{PG-MAP}: Joint {MAP} Optimization for Inference-Time Alignment of Diffusion and Flow-Matching Models},
40
  author={Sun, Ruolan and Polak, Pawel},
41
- booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
42
- year={2026}
 
43
  }
44
  ```
 
8
  app_file: app.py
9
  pinned: true
10
  license: mit
11
+ short_description: PG-MAP inference-time alignment (NeurIPS 2026 submission)
12
  ---
13
 
14
+ # PG-MAP Demo · NeurIPS 2026 (under review)
15
 
16
  Interactive demo for **PG-MAP** (Preference-Guided Adaptive MAP) — a training-free framework that re-optimizes the conditioning $c$ and the latent $z_t$ at every denoising step. Supports SD 1.5, SDXL, and SD3.5-medium (UG-FM) backbones.
17
 
18
+ - 🔗 **Paper** (preprint, under review at NeurIPS 2026): [github.com/sophialanlan/PG-MAP](https://github.com/sophialanlan/PG-MAP)
19
  - 🤗 **Custom diffusers pipelines**: [pg-map-sd15](https://huggingface.co/sophialan/pg-map-sd15) · [pg-map-sdxl](https://huggingface.co/sophialan/pg-map-sdxl) · [pg-map-sd3](https://huggingface.co/sophialan/pg-map-sd3)
20
+ - 📦 **PyPI**: `pip install pgmap-align`
21
 
22
  ## Hardware
23
 
 
35
  ## Citation
36
 
37
  ```bibtex
38
+ @misc{sun2026pgmap,
39
  title={{PG-MAP}: Joint {MAP} Optimization for Inference-Time Alignment of Diffusion and Flow-Matching Models},
40
  author={Sun, Ruolan and Polak, Pawel},
41
+ year={2026},
42
+ note={Preprint; under review at NeurIPS 2026},
43
+ url={https://github.com/sophialanlan/PG-MAP}
44
  }
45
  ```
app.py CHANGED
@@ -35,7 +35,7 @@ def _load(backbone: str):
35
 
36
  from diffusers import DiffusionPipeline
37
  spec = {
38
- "SD 1.5 (512²)": ("runwayml/stable-diffusion-v1-5", "sophialan/pg-map-sd15", {}),
39
  "SDXL (1024²)": ("stabilityai/stable-diffusion-xl-base-1.0","sophialan/pg-map-sdxl", {"variant": "fp16"}),
40
  "SD3.5-medium (1024²)": ("stabilityai/stable-diffusion-3.5-medium", "sophialan/pg-map-sd3", {}),
41
  }[backbone]
@@ -111,13 +111,13 @@ def generate(prompt, backbone, seed, steps, guidance, lambda_reward, eta_z, K_in
111
 
112
 
113
  DESCRIPTION = """\
114
- # PG-MAP Demo &nbsp;·&nbsp; NeurIPS 2026
115
 
116
  **Inference-time alignment for diffusion + flow-matching** — re-optimize the
117
  conditioning $c$ and the latent $z_t$ at every denoising step under a
118
  trajectory-level Gibbs-MAP / proximal energy objective. No training required.
119
 
120
- 🔗 Code: [github.com/sophialanlan/PG-MAP](https://github.com/sophialanlan/PG-MAP) · Paper: NeurIPS 2026 (anonymous review materials in repo) · HF Pipelines: [sd15](https://huggingface.co/sophialan/pg-map-sd15) · [sdxl](https://huggingface.co/sophialan/pg-map-sdxl) · [sd3](https://huggingface.co/sophialan/pg-map-sd3)
121
 
122
  Pick a backbone, write a prompt, hit **Generate**. Toggle PG-MAP off to compare against the static baseline at the same seed. Default hyperparameters match the paper table; the sliders expose the productive ranges.
123
  """
@@ -132,7 +132,7 @@ EXAMPLES = [
132
 
133
 
134
  def build_app():
135
- with gr.Blocks(title="PG-MAP Demo · NeurIPS 2026", theme=gr.themes.Soft()) as demo:
136
  gr.Markdown(DESCRIPTION)
137
  with gr.Row():
138
  with gr.Column(scale=2):
 
35
 
36
  from diffusers import DiffusionPipeline
37
  spec = {
38
+ "SD 1.5 (512²)": ("stable-diffusion-v1-5/stable-diffusion-v1-5", "sophialan/pg-map-sd15", {}),
39
  "SDXL (1024²)": ("stabilityai/stable-diffusion-xl-base-1.0","sophialan/pg-map-sdxl", {"variant": "fp16"}),
40
  "SD3.5-medium (1024²)": ("stabilityai/stable-diffusion-3.5-medium", "sophialan/pg-map-sd3", {}),
41
  }[backbone]
 
111
 
112
 
113
  DESCRIPTION = """\
114
+ # PG-MAP Demo &nbsp;·&nbsp; NeurIPS 2026 (under review)
115
 
116
  **Inference-time alignment for diffusion + flow-matching** — re-optimize the
117
  conditioning $c$ and the latent $z_t$ at every denoising step under a
118
  trajectory-level Gibbs-MAP / proximal energy objective. No training required.
119
 
120
+ 🔗 Code: [github.com/sophialanlan/PG-MAP](https://github.com/sophialanlan/PG-MAP) · Paper: preprint, under review at NeurIPS 2026 · HF Pipelines: [sd15](https://huggingface.co/sophialan/pg-map-sd15) · [sdxl](https://huggingface.co/sophialan/pg-map-sdxl) · [sd3](https://huggingface.co/sophialan/pg-map-sd3)
121
 
122
  Pick a backbone, write a prompt, hit **Generate**. Toggle PG-MAP off to compare against the static baseline at the same seed. Default hyperparameters match the paper table; the sliders expose the productive ranges.
123
  """
 
132
 
133
 
134
  def build_app():
135
+ with gr.Blocks(title="PG-MAP Demo · NeurIPS 2026 (under review)", theme=gr.themes.Soft()) as demo:
136
  gr.Markdown(DESCRIPTION)
137
  with gr.Row():
138
  with gr.Column(scale=2):
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
- # Gradio Space dependencies. PG-MAP installs from the GitHub release at the
2
- # pinned v1.2.0 tag so the demo behavior is reproducible.
3
  gradio>=4.0.0
4
  torch>=2.1.0
5
  torchvision>=0.16.0
@@ -10,4 +10,4 @@ safetensors>=0.4.0
10
  open-clip-torch>=2.24.0
11
  numpy<2.0
12
  Pillow>=10.0.0
13
- git+https://github.com/sophialanlan/PG-MAP@v1.2.0
 
1
+ # Gradio Space dependencies. PG-MAP installs from the published PyPI package
2
+ # pinned at pgmap-align==1.5.2 so the demo behavior is reproducible.
3
  gradio>=4.0.0
4
  torch>=2.1.0
5
  torchvision>=0.16.0
 
10
  open-clip-torch>=2.24.0
11
  numpy<2.0
12
  Pillow>=10.0.0
13
+ pgmap-align==1.5.2