Qt UI file split#1565
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… VideoToolUI Removes abstract _create_browse_dir_button/_create_browse_file_button from BaseVideoToolUIView and uses the combined path_entry component instead, fixing widget alignment issues. Adds allow_video_files flag to path_entry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…IView Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…files) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Base view concrete methods were accessing self.controller, self.ui_state, and toolkit-specific action methods that were only set by CTK subclass __init__ after the base __init__ call, with no enforcement in the base. - BaseTrainUIView: add controller/ui_state as constructor params; fix sync_cloud_secrets to use controller.train_config; add @AbstractMethod for export_training, generate_debug_package, open_profiling_tool - CtkTrainUIView: reorder __init__ to create deps before base init call; replace self.train_config with self.controller.train_config - BaseCloudTabView: add controller as constructor param - CtkCloudTabView: pass controller to base __init__, drop redundant assignment - BaseCaptionUIView: add ABC + @AbstractMethod for 6 action callbacks - BaseConceptTabView: remove concrete _update_filters() (accessed CTK vars); add ConceptConfig import; add concept: ConceptConfig param to BaseConceptWidgetView.__init__ - CtkConceptTabView: implement _update_filters(); pass concept to base init - BaseConceptWindowView: initialize bucket_ax/text_color/canvas to None - BaseTrainingTabView: replace callbacks dict with 6 @AbstractMethod declarations; restore_optimizer_config(variable: str) matches controller - CtkTrainingTabView: implement all 6 abstract methods directly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ctypes DPI awareness call is toolkit-specific (fixes CTK transparency on Windows monitor changes). It already exists in CtkTrainUIView.py and has no place in the toolkit-agnostic controller. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
search_var/filter_var/show_disabled_var were stored in the base but never used there after _update_filters() was removed. Subclasses manage them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Brings in upstream changes (remove COFT #1447, remove cautious_mask #1451, fix aux optimizer defaults #1444). Conflicts resolved by keeping the ctk_abstraction refactored versions (self.components, controller delegation). COFT removal applied manually to BaseLoraTabView. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eep ctk_abstraction for UI conflicts - Apply LoKr and Scaled OFT additions to BaseLoraTabView/LoraTabController - Apply ETA session-tracking fix to TrainUIController - Apply local row counter fix to BaseTrainingTabView.__create_text_encoder_frame - Keep both supported_caption_extensions and json_path_modifier in path_util Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Was sitting on the same row at columns 3-4; now on its own row directly below the toggle for clearer visual grouping. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Was sitting on the same row at columns 3-4; now on its own row directly below the toggle for clearer visual grouping. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…erge Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts: # modules/ui/BaseConceptWindowView.py # modules/ui/CtkConceptWindowView.py
# Conflicts: # modules/ui/BaseConceptWindowView.py # modules/ui/BaseTimestepDistributionWindowView.py # modules/ui/BaseTrainingTabView.py # modules/ui/CtkConceptWindowView.py # modules/ui/CtkTimestepDistributionWindowView.py # modules/ui/CtkTrainingTabView.py
…x2 LoHA loading) (#1549)
previous_image/next_image called self.view.switch_image, but switch_image lives on the controller, not the view; arrow keys raised AttributeError. Also convert the _make_svd_frames docstring to a # comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… split The Base/Ctk/Controller refactor deleted modules/ui/CaptionUI.py, ConvertModelUI.py and VideoToolUI.py, but the three entry scripts still imported them, crashing on launch with ModuleNotFoundError. Wire each script through the new controller + create_window(parent, view_cls) pattern (as TrainUIController already does internally). The new views are CTkToplevel, not CTk roots, so launch them under a hidden CTk root and wait_window on the toplevel to avoid a stray empty "tk" window and to exit cleanly on close. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The ctk view refactor moved ConceptWindow.__download_dataset into the new ConceptWindowController.download_dataset from a base predating PR #1524, which silently reverted that PR's fix: the method again called huggingface_hub.login(token=..., new_session=False) with no empty-token guard. new_session was removed from login() in huggingface-hub 1.16, so every call raised TypeError, swallowed by the surrounding except, so snapshot_download never ran and dataset download was fully broken. Re-apply #1524 at the new location: only login when a token is configured, and drop new_session. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Base/Ctk refactor renamed UIState to BaseUIState (UIState.py) plus CtkUIState (CtkUIState.py) and updated validation.py, but missed the ctk sibling: ctk_validation.py still imported the now-nonexistent UIState under TYPE_CHECKING. Point it at CtkUIState, the concrete state actually passed to these ctk validators (mirroring validation.py -> BaseUIState). Invisible to ruff and the runtime (used in a string annotation, under TYPE_CHECKING, with future annotations), so only a type checker would flag it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
BaseConfigListView and BaseAdditionalEmbeddingsTabView imported customtkinter solely for a `-> ctk.CTkToplevel` return annotation on the abstract open_element_window, the lone toolkit reference in the Base layer (the sibling abstract methods return toolkit objects unannotated). Drop the annotation and the import so the Base layer is genuinely toolkit-free; the concrete Ctk subclasses keep their own CTkToplevel annotation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… split The ctk view split copied OptimizerParamsWindow into a controller from a base that predated #1444, reverting `if not current_state:` back to `if current_state is None:`. Since muon_adam_config defaults to {} (not None), the empty initial state fell through to from_dict({}), so the Muon/aux-Adam window opened with bare default_values() instead of MUON_AUX_ADAM_DEFAULTS / ADAMW_ADV. Restore the upstream one-line guard. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…izer params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gc to close connect_window_closed bound <Destroy> unconditionally, so the callback fired once per descendant widget as the toplevel tore down. Guard on the event widget being the window itself so it fires exactly once. With that in place, open_sampling_tool defers torch_gc to window close via connect_window_closed instead of running it inline at open time, restoring the original 'free GPU memory after the sample window closes' behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR copies all Ctk files of #1445 to Qt files. It doesn't implement them yet, just copy. The implementation is in #1446
I'll keep this a separate commit in git history, for good "blame" tracability ("what has changed between Ctk and Qt")