Skip to content

Add reference image guidance for diagram planning#258

Closed
simplaj wants to merge 1 commit into
llmsresearch:mainfrom
simplaj:feat/input-image-guidance-223
Closed

Add reference image guidance for diagram planning#258
simplaj wants to merge 1 commit into
llmsresearch:mainfrom
simplaj:feat/input-image-guidance-223

Conversation

@simplaj

@simplaj simplaj commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #223.

Adds and hardens reference/sketch image guidance for methodology diagram generation. The CLI validates repeatable --image inputs before pipeline start, the Planner attaches user-provided images after retrieved exemplars and labels their attached-image positions explicitly, and the Visualizer gets a lightweight note when a plan was sketch-guided. The Critic continues to judge only the generated output against the source text/caption.

Changes

  • Validate --image paths with PIL and normalize them to absolute paths before constructing GenerationInput.
  • Preserve existing repeatable --image behavior while improving missing-file/non-raster error messages.
  • Label user-provided images in the Planner prompt with exact attached image numbers, offset after successfully loaded exemplar images.
  • Record input_image_count in progress and persist input_images in planning metadata.
  • Expand planner and CLI tests for image ordering, path validation, missing/non-image inputs, and --continue conflicts.

Verification

  • .venv/bin/python -m pytest tests/test_pipeline/test_types.py tests/test_agents/test_planner.py tests/test_cli.py -k "image or input_images" -q -> 22 passed
  • .venv/bin/python -m ruff check paperbanana/agents/planner.py paperbanana/agents/visualizer.py paperbanana/cli.py paperbanana/core/pipeline.py paperbanana/core/types.py tests/test_agents/test_planner.py tests/test_cli.py tests/test_pipeline/test_types.py -> passed
  • git diff --check origin/main...HEAD -> clean
  • git merge-tree $(git merge-base HEAD origin/main) HEAD origin/main -> clean
  • GitHub compare: ahead_by=1, behind_by=0

@simplaj simplaj force-pushed the feat/input-image-guidance-223 branch from e98e628 to 5a1979f Compare June 16, 2026 07:47
@simplaj simplaj requested a review from dippatel1994 June 17, 2026 12:47
@simplaj simplaj closed this Jun 17, 2026
@simplaj

simplaj commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

It appears this issue has already been fixed in other PRs, so I'll close this one for now. Thanks for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Reference/sketch image input to guide diagram generation

1 participant