Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Improve separation of concerns / lifecycle #482

Merged
merged 6 commits into from
Dec 14, 2024

Conversation

webfiltered
Copy link
Contributor

Clean up - Part I

  • Improves separation of concerns in DesktopConfig
  • Refactors to use() pattern
  • Converts / removes static accessors

Intention is to require less future-effort. No libraries I checked use static classes for this kind of thing.

@webfiltered webfiltered requested a review from a team as a code owner December 14, 2024 14:19
@webfiltered webfiltered changed the title Settings lifecycle [Refactor] Improve separation of concerns / lifecycle for config object Dec 14, 2024
@webfiltered webfiltered changed the title [Refactor] Improve separation of concerns / lifecycle for config object [Refactor] Improve separation of concerns / lifecycle Dec 14, 2024
Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -25,4 +25,5 @@ export type DesktopSettings = {
detectedGpu?: GpuType;
/** The pytorch device that the user selected during installation. */
selectedDevice?: TorchDeviceType;
'Comfy-Desktop.RestoredCustomNodes': boolean;
Copy link
Member

Choose a reason for hiding this comment

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

We should probably remove this custom node restoration as that was caused by Manager installing custom nodes in wrong location before an eariler version. Now existing users and new users shouldn't have a need for this migration.

@huchenlei huchenlei merged commit 26b29c4 into main Dec 14, 2024
7 checks passed
@huchenlei huchenlei deleted the settings-lifecycle branch December 14, 2024 17:49
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