Fix unseeded generation when seed_base is unset; make the critic's request params configurable

#17

Three fixes to agentic_upsampling/, one per commit so they can be taken separately.

Seed base. With seed_base=None the generator got seed=None, so every iteration re-rolled the noise. Best-of-N then compared images that differed by prompt and noise together, so a score change couldn't be attributed to the rewrite and runs weren't reproducible. Now one base is drawn per item and reused across iterations (slot j gets base + j), matching how an explicit seed_base already behaves. The value is recorded on the result so a run can be reproduced. A resumed run draws a new base; happy to persist it instead if you'd rather.

Critic request params. VLMQualityJudge built its request with fixed parameters, so callers reproducing a specific setup couldn't pin reasoning_effort. Adds an extra_body passthrough, default None, so requests are unchanged unless set. Also raises the critic's max_tokens to 16384: thinking tokens come from the same budget, and we measured up to ~6.7k for gemini-3.1-pro at reasoning_effort=high.

Flaky test. Samples in an iteration are generated concurrently, but the seed assertion compared the recorded list in order. It fails about 1 run in 12 on main today. Now compares each iteration's seeds as a sorted group.

17 tests pass, 15 consecutive full-suite runs clean.

This comment has been hidden
arturzolkowski changed pull request title from Compare per-iteration seeds as a set in the parallel-generation test to Fix unseeded generation when seed_base is unset; make the critic's request params configurable
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment