Skip to content

fix: capture repaint settings in AutoGen batch parameter snapshot#922

Merged
ChuxiJ merged 1 commit intoace-step:mainfrom
PSiKoTiC:fix/autogen-repaint-capture
Mar 21, 2026
Merged

fix: capture repaint settings in AutoGen batch parameter snapshot#922
ChuxiJ merged 1 commit intoace-step:mainfrom
PSiKoTiC:fix/autogen-repaint-capture

Conversation

@PSiKoTiC
Copy link
Contributor

@PSiKoTiC PSiKoTiC commented Mar 21, 2026

Summary

  • Capture repaint_mode and repaint_strength in the AutoGen batch parameter snapshot so background generation uses the user's actual settings instead of silently falling back to defaults

Problem

PR #816 added repaint_mode and repaint_strength as required parameters to generate_with_progress() and wired them into the foreground generation path. The batch/AutoGen path was not updated — capture_current_params() never captured these values, and _build_capture_current_params_inputs() never passed the UI components.

PR #877 fixed the resulting crash by adding .get() fallbacks with defaults in generate_next_batch_background(), but the parameter capture itself was still missing. The result: AutoGen batches always generate with "balanced" mode at strength 0.5 regardless of what the user selects in the UI. No error, no crash — just silently ignored settings.

Fix

Added repaint_mode and repaint_strength to two functions that were missed during the #816 wiring:

  • capture_current_params() in batch_queue.py — added to function signature and return dict so the snapshot includes the user's repaint settings
  • _build_capture_current_params_inputs() in generation_batch_navigation_wiring.py — added the two UI components to the Gradio input list so their values are passed to the capture function

Total change is 6 lines of production code across 2 files. Follows the exact same pattern as every other parameter in both functions.

Completes the fix started in #877.

Platform impact

Platform Effect
Windows (CUDA) AutoGen batches now respect repaint settings
Linux (CUDA/ROCm) Structurally identical — no platform-specific code paths touched
macOS (MPS) Structurally identical — no platform-specific code paths touched
CPU / no accelerator Structurally identical — no platform-specific code paths touched

Test plan

  • test_repaint_params_included_in_capture — non-default values (aggressive, 0.8) round-trip through capture
  • test_repaint_params_default_values_captured — default values (balanced, 0.5) round-trip through capture
  • test_capture_clears_audio_codes — existing behavior preserved (audio codes cleared for fresh AutoGen content)
  • test_capture_forces_random_seed — existing behavior preserved (random seed forced for variation)
  • All 31 existing tests across batch_queue_test.py, batch_management_background_test.py, and decomposition_contract_generation_test.py pass

Summary by CodeRabbit

  • New Features

    • Repaint configuration settings are now preserved when navigating between batches during generation operations.
  • Tests

    • Added test coverage for repaint parameter preservation in batch workflows.

capture_current_params() and _build_capture_current_params_inputs()
were missing repaint_mode and repaint_strength, causing AutoGen batches
to silently fall back to defaults instead of using the user's settings.

Completes the fix started in ace-step#877.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd0c7e91-aad2-486f-a2a3-f189c4cf340e

📥 Commits

Reviewing files that changed from the base of the PR and between 00f514a and cc00b04.

📒 Files selected for processing (3)
  • acestep/ui/gradio/events/results/batch_queue.py
  • acestep/ui/gradio/events/results/batch_queue_test.py
  • acestep/ui/gradio/events/wiring/generation_batch_navigation_wiring.py

📝 Walkthrough

Walkthrough

The changes add capture support for two repaint UI parameters—repaint_mode and repaint_strength—across the batch generation navigation system. The core capture function is extended to include these parameters, wiring configuration is updated to feed them as inputs, and unit tests verify the new behavior.

Changes

Cohort / File(s) Summary
Core Capture Updates
acestep/ui/gradio/events/results/batch_queue.py, acestep/ui/gradio/events/wiring/generation_batch_navigation_wiring.py
Added repaint_mode and repaint_strength parameter capture to the state restoration pipeline; docstring updated to reflect repaint controls in the normalization section.
Unit Test Coverage
acestep/ui/gradio/events/results/batch_queue_test.py
New CaptureCurrentParamsTests suite validates that repaint parameters are captured correctly (both overridden and default cases), text2music_audio_code_string is cleared, and random_seed_checkbox is forced to True.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #877: Adds and propagates the same repaint_mode and repaint_strength parameters through background/save/pass-through batch-generation plumbing, complementing this PR's capture/wiring updates.

Suggested reviewers

  • ChuxiJ

Poem

🐰 A rabbit hops through batches with glee,
Capturing repaint modes, one, two, three!
Colors preserved as we navigate,
Strength held steady through each generate,
Parameters dancing—oh what a sight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and clearly describes the main fix: capturing repaint settings in AutoGen batch parameter snapshots, which is the core change across the modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ChuxiJ ChuxiJ merged commit b800a31 into ace-step:main Mar 21, 2026
3 checks passed
@PSiKoTiC PSiKoTiC deleted the fix/autogen-repaint-capture branch March 21, 2026 16:22
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.

2 participants