Skip to content

Conversation

@Alchemist-Production
Copy link

In paint selection, sample History, some minor GUI fixes.

google-labs-jules bot and others added 29 commits February 5, 2026 13:04
- Created Roadmap.md with improvement plan.
- Implemented idempotent initialization in AceStepHandler and LLMHandler to prevent unnecessary reloads on UI refresh.
- Added UI state synchronization on app load to fix browser refresh issues.
- Reorganized UI: Moved LoRA management to a dedicated "LoRA & Training" tab.
- Added a new "History" tab to view past generations and reload parameters.
- Cleaned up event wiring and fixed potential logic breaks.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
- Updated Roadmap.md with completed tasks.
- Polished Generation UI: Added header for DiT parameters.
- Verified 'Send to Src' logic: Confirmed `send_audio_to_src_with_metadata` correctly handles None inputs and returns correct output count.
- Previously implemented idempotent init, History tab, and LoRA UI reorganization.
- Fixed minor syntax issue in init_handlers and history.py.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…-history-17174925700800307509

Refactor UI, Fix Initialization, Add History Tab
- Changed "🎲" icon-only buttons to "🎲 Random" for better accessibility and clarity.
- Added tooltip explanations (`info`) to "Think" and "Parallel Thinking" checkboxes to clarify their purpose.
- Renamed "ParallelThinking" to "Parallel Thinking" for better readability.
- Updated "Format" button to "✨ Format" to be more inviting.
- Updated translation keys in `en.json`.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…ts-generation-15368806975920227578

🎨 Palette: Improve Generation UI accessibility and clarity
- Modify `result.py` to keep the second audio row container (`audio_row_5_8`) always visible, toggling only internal columns. This prevents layout thrashing that caused unclickable buttons and UI breakage when switching batch sizes > 4.
- Update `Roadmap.md` with new features requested: Inpainting Range Selector, File Naming, History improvements, Song Builder, and Scratchpad.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…dmap-11892788060940512364

Fix Batch Size UI Breakage and Update Roadmap
- Monkey-patch the decoder forward method in AceStepHandler to handle batch size mismatches (specifically when context size is 2x latent size, likely due to CFG).
- Ensure patch is applied during initialization, LoRA loading, and LoRA unloading.
- This addresses the `RuntimeError: Sizes of tensors must match` when using `audio_cover_strength < 1.0` or other mixed condition settings.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…tch-cfguidance-5037095380997239628

Fix AceStep decoder tensor mismatch via runtime patch
- Added `custom_track_name` and `scratchpad` to Generation UI.
- Implemented file naming convention: `{Name}_V1.1-inpaint_{start}:{end}`.
- Ensured persistence of new parameters in JSON metadata and History.
- Fixed `load_file` and `history` loading to handle new parameters.
- Updated Roadmap.md.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…ratchpad-12569491979914574975

Add Track Name and Scratchpad to Generation UI
Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…nts-16723564683779929076

History Tab Improvements: Send to Src/Ref Audio buttons
- Add 'Set Start' and 'Set End' buttons to the inpainting controls in `generation.py`.
- Bind buttons to capture `currentTime` from the source audio player using JavaScript.
- Update `en.json` with new button labels.
- Mark item 6 as complete in `Roadmap.md`.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…-selector-12956494283163450967

Implement Inpainting Range Selector Buttons
Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…onality-10632476076086842895

Add Delete Functionality to History Tab
- Initialize audio_row_5_8 as hidden in result.py to prevent empty space on load.
- Dynamically toggle audio_row_5_8 visibility in generation_handlers.py based on batch size.
- Remove misleading comment about layout thrashing.
- Update Roadmap.md.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…4625087038821388

Fix batch size UI empty space issue
- Add checkbox column to history table in `acestep/gradio_ui/interfaces/history.py`.
- Implement `delete_selected_items` in `acestep/gradio_ui/events/history_handlers.py`.
- Split delete UI into "Delete Preview" and "Delete Checked" buttons.
- Wire new events in `acestep/gradio_ui/events/__init__.py`.
- Update `Roadmap.md` to reflect completion.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…15229468381938248137

feat: Implement bulk delete in History tab
- Wrapped `generate_audio` in `AceStepHandler` with try-except to catch Flash Attention RuntimeError and provide a user-friendly error message.
- Updated JavaScript for "Set Start" and "Set End" buttons in Gradio UI to robustly find the audio element and log debug info.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…npaint-buttons-15808502805814991739

Fix Flash Attention crash and inpainting buttons
- Update DiT parameters range for Turbo (8-20, default 8) and Base (50-200, default 50).
- Update default `inference_steps` slider in `generation.py` to match Turbo defaults (min 8).
- Fix "Set start" and "Set end" buttons JS to robustly find the correct audio element by checking for duration > 0.
- Explicitly set `visible=True` for `inference_steps` when updating model settings to ensure visibility.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…s-8807041985701687357

Fix DiT Parameters and Audio Time Setters
- **DiT Parameters:**
    - Explicitly set `visible=True` for `inference_steps` slider in `acestep/gradio_ui/interfaces/generation.py` to ensure it renders.
    - Set default `minimum=1` in `generation.py` to prevent initialization conflicts, while `value=8` defaults to Turbo settings.
    - Updated `acestep/gradio_ui/events/generation_handlers.py` to enforce correct ranges and visibility:
        - Turbo: 8-20 steps (default 8).
        - Base: 50-200 steps (default 50).
- **Set Start/End Bug:**
    - Fixed JS in `acestep/gradio_ui/events/__init__.py` to correctly retrieve audio playback time. Previous implementation failed to find the audio element, resetting values to 0. New JS robustly searches for the active audio element with duration > 0.
- **Cleanup:**
    - Ensured no dev dependencies (Playwright) are included in `pyproject.toml`.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
- Updated JavaScript in `acestep/gradio_ui/events/__init__.py` for "Set Start" and "Set End" buttons.
- The new JS logic now correctly traverses the Shadow DOM of the Gradio Audio component to find the active audio element and retrieve the precise playback timestamp.
- Added a fallback to the previous selector for backward compatibility.
- This addresses the issue where timestamps were defaulting to 0.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…ection-6924592743166025103

Fix Inpaint Start/End time selection buttons returning 0
@Alchemist-Production
Copy link
Author

Fixed a number of things, Orginized the LORA training into its own tab, also added the ability to Name files and reopen past generations from the history.

Alchemist-Production and others added 7 commits February 5, 2026 17:40
- Correctly identify models with 'sft' in the name as Base models (not Turbo).
- Update Base/SFT inference steps range to 1-200 with default 50.
- Update Turbo inference steps range to 1-20 with default 8.
- Ensure correct UI component visibility (e.g. Guidance Scale) when selecting SFT models.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…-937373757266111711

Fix SFT model config and inference step ranges
- Modified `generate_music` in `acestep/handler.py` to check if `target_latents` is present in the `outputs` dictionary returned by `service_generate`.
- This ensures that if `service_generate` returns an error status (e.g., due to Flash Attention crash), `generate_music` propagates the error gracefully instead of crashing with a `KeyError`.

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…crash-handling-2840965787611119883

Fix KeyError in generate_music on service failure
Previously, audio code tokens outside the valid range [0, 63999] triggered a warning but were not added to the blocking mask. This meant they could potentially be generated during caption/metadata generation.

This change:
1. Collects these invalid tokens instead of just warning about them.
2. Updates the log message to be a DEBUG level confirmation that they are handled.
3. Adds them to the blocking mask for caption generation (preventing them from appearing in text).
4. Ensures they remain excluded from the allowing mask for code generation (preventing them from being generated as audio codes).

Co-authored-by: Alchemist-Production <222590780+Alchemist-Production@users.noreply.github.com>
…ng-10265399163550828065

Handle invalid audio code tokens in logits processor
@ChuxiJ ChuxiJ requested a review from Copilot February 6, 2026 02:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements quality-of-life improvements and bug fixes focused on the paint selection feature, history sampling, and various GUI enhancements. It adds a new History tab for browsing previous generations, improves initialization state tracking to avoid redundant model reloads, and enhances the LoRA management interface by moving it to a dedicated page.

Changes:

  • Added History tab with sample browsing, metadata viewing, and parameter loading capabilities
  • Implemented initialization state tracking to prevent redundant model reloads when already initialized with same parameters
  • Moved LoRA management controls from Generation tab to a dedicated LoRA & Training page for better organization

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pyproject.toml Fixed trailing comma syntax
acestep/llm_inference.py Added initialization state tracking (model path, backend, device) to prevent redundant reloads
acestep/handler.py Added initialization state tracking and decoder patching for batch size mismatches
acestep/gradio_ui/interfaces/training.py Renamed and reorganized to create dedicated LoRA management page
acestep/gradio_ui/interfaces/result.py Fixed visibility of audio columns 5-8
acestep/gradio_ui/interfaces/history.py New file implementing history browsing functionality
acestep/gradio_ui/interfaces/generation.py Moved LoRA controls out, added custom track naming and scratchpad features
acestep/gradio_ui/interfaces/init.py Updated imports and function calls for renamed components
acestep/gradio_ui/i18n/en.json Added translation keys for new UI elements
acestep/gradio_ui/events/results_handlers.py Added custom track naming logic and reference audio sending
acestep/gradio_ui/events/init_handlers.py New file for app load synchronization with server state
acestep/gradio_ui/events/history_handlers.py New file implementing history event handlers
acestep/gradio_ui/events/generation_handlers.py Updated to handle new custom_track_name and scratchpad parameters
acestep/gradio_ui/events/init.py Integrated history handlers and app load sync
acestep/constrained_logits_processor.py Improved invalid audio code token handling
.md Empty file addition
.Jules/palette.md Documentation of accessibility learning about icon-only buttons
Comments suppressed due to low confidence (1)

acestep/gradio_ui/interfaces/history.py:1

  • The json.load operation at line 49 is wrapped in a generic exception handler that only prints errors. If JSON parsing fails, users won't get helpful feedback about which file is corrupted or why. Consider adding more specific error messaging or validation.
"""

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +575 to +578
original_forward = decoder._original_forward
else:
original_forward = decoder.forward
decoder._original_forward = original_forward
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a leading underscore followed by inconsistent indentation (space instead of standard 4 spaces). Line 575 has 5 spaces of indentation instead of the standard 4, creating inconsistent code formatting.

Suggested change
original_forward = decoder._original_forward
else:
original_forward = decoder.forward
decoder._original_forward = original_forward
original_forward = decoder._original_forward
else:
original_forward = decoder.forward
decoder._original_forward = original_forward

Copilot uses AI. Check for mistakes.
Comment on lines +575 to +578
original_forward = decoder._original_forward
else:
original_forward = decoder.forward
decoder._original_forward = original_forward
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a leading underscore followed by inconsistent indentation (space instead of standard 4 spaces). Line 577 has 5 spaces of indentation instead of the standard 4, creating inconsistent code formatting.

Suggested change
original_forward = decoder._original_forward
else:
original_forward = decoder.forward
decoder._original_forward = original_forward
original_forward = decoder._original_forward
else:
original_forward = decoder.forward
decoder._original_forward = original_forward

Copilot uses AI. Check for mistakes.
if custom_track_name and str(custom_track_name).strip():
# Sanitize filename
base_name = str(custom_track_name).strip()
base_name = re.sub(r'[\\/*?:"<>|]', "", base_name)
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern for sanitizing filenames should be defined as a module-level constant to avoid recompiling the pattern on every call and improve maintainability.

Copilot uses AI. Check for mistakes.
.md
@@ -0,0 +1 @@

Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty file with no content or purpose should be removed to keep the repository clean.

Copilot uses AI. Check for mistakes.
Comment on lines +195 to +198
return [None] * 38 + [False]
except Exception as e:
gr.Warning(t("messages.load_error", error=str(e)))
return [None] * 36 + [False]
return [None] * 38 + [False]
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number 38 is used without explanation. Consider defining this as a named constant representing the total number of return values from load_metadata to improve maintainability and prevent errors if the count changes.

Copilot uses AI. Check for mistakes.
if current_batch_index not in batch_queue:
gr.Warning(t("messages.no_batch_data"))
return [gr.update()] * 20 # Updated count: 1 codes + 19 other params
return [gr.update()] * 22 # Updated count: 1 codes + 21 other params
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment '1 codes + 21 other params' doesn't add up to 22. This inconsistency could cause confusion. Either the calculation is wrong or the comment needs correction.

Suggested change
return [gr.update()] * 22 # Updated count: 1 codes + 21 other params
return [gr.update()] * 22 # 22 outputs: codes field + 21 other parameters

Copilot uses AI. Check for mistakes.
@ChuxiJ
Copy link
Contributor

ChuxiJ commented Feb 7, 2026

Too many changes make testing difficult. Let's take it step by step.

Also resolve the conflicts

@ChuxiJ ChuxiJ closed this Feb 11, 2026
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