You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow passing existing images (hand-drawn sketch, whiteboard photo,
prior figure version) as guidance alongside the methodology text:
- GenerationInput gains input_images: list[str] (paths)
- Repeatable --image PATH on `paperbanana generate`; files are
validated (existence + PIL-openable raster) before the pipeline
starts, and rejected when combined with --continue/--continue-run
- Planner attaches the images as additional image parts after the
retrieved exemplar images, labeled as user-provided reference/sketch
in the prompt (exemplar "reference image N" indexing is preserved)
- Visualizer diagram prompt gets a one-line note that a user sketch
guided the plan (carried via a sketch_guided flag so the note never
leaks into the description the Critic reviews)
- The Critic never sees the sketch: it keeps judging against the
source text only
- input_images survives the --optimize input rebuild and is recorded
in run_input.json for reproducibility
- MCP: generate_diagram gains optional input_images (validated paths)
Fixes#223
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,12 +255,19 @@ paperbanana generate \
255
255
--input paper.pdf \
256
256
--caption "Overview of our method" \
257
257
--pdf-pages "3-8"
258
+
259
+
# Guide generation with a reference/sketch image (repeatable)
260
+
paperbanana generate \
261
+
--input method.txt \
262
+
--caption "Overview of our framework" \
263
+
--image sketch.png --image prior_figure.png
258
264
```
259
265
260
266
| Flag | Short | Description |
261
267
|------|-------|-------------|
262
268
|`--input`|`-i`| Path to methodology text file or PDF (required for new runs) |
263
269
|`--caption`|`-c`| Figure caption / communicative intent (required for new runs) |
270
+
|`--image`|| Reference/sketch image (hand-drawn sketch, whiteboard photo, prior figure) that guides the Planner. Repeatable for multiple images |
264
271
|`--output`|`-o`| Output image path (default: auto-generated in `outputs/`) |
265
272
|`--iterations`|`-n`| Number of Visualizer-Critic refinement rounds (default: 3) |
266
273
|`--num-candidates`|`-k`| Generate N candidate images in parallel, 1-8 (default: 1). Planning runs once; refinement fans out per candidate with seed offsets. Outputs land in `candidates/cand_<i>/`; the run-root `final_output` is candidate 1. Cost estimates and `--budget` account for the fan-out |
0 commit comments