Skip to content

refactor: SwiftData ModelContext dependencies#79

Merged
buzsh merged 70 commits into
mainfrom
refactor-swiftdata-model-context-dependencies
Mar 9, 2024
Merged

refactor: SwiftData ModelContext dependencies#79
buzsh merged 70 commits into
mainfrom
refactor-swiftdata-model-context-dependencies

Conversation

@buzsh

@buzsh buzsh commented Mar 4, 2024

Copy link
Copy Markdown
Owner

Important

Incompatibility notice: v0.1-beta.0 b1000 and earlier

Due to changes in the SwiftData model schema, this update will be incompatible with existing databases from v0.1-beta.0 (b1000) and earlier. In the future, I'll implement migration schemes for larger model transitions; however, given that the application is in active development, this would take too much time to do for each independent model transition.

previews - light

Changes

  • Lots and lots and lots of stability improvements
    • Seriously, lots
  • Improved main thread priority processes
  • Reduced main thread processes to essential tasks
  • Improved background, asynchronous logic
    • Most processes should no longer stall on main
    • Still refactoring @MainActor logic for essential model interfaces
  • Fix rendering, lag issues on window active
  • Fix stutter issues with PyTorch processes
  • Fix invalid sampling method key in JSON payload
  • Improved local database model management
    • Non-optionals, non-deletables: rootFolder, workspaceFolder
    • .parent relationship attributes
    • @relationship(deleteRule: .cascade)
  • Improved SidebarItem management
    • Centralize SidebarModel logic
    • Fix item deletion logic in context
    • Additional handling logic for deletion (recursive delete ImageInfo, PromptModel, cache, etc.)
  • Improved Folder management
    • Centralize SidebarModel logic
    • Fix folder deletion logic in context
    • Recursive handling for embedded folders, items (queued for deletion)
  • Reworked Parse Generation Data logic from pasteboard
    • Asynchronous checks for valid tags
    • Parsing creates a new workspace item now instead of interfacing with PromptView directly
  • Improved copy, move logic
  • Add persisting "New Prompt", "New Folder" below each section
  • Fix Checkpoint Manager issues
    • Fix nil sheet view causing unclosable window
    • Fix deletion, presentation direct from model items
    • Alphabetical ordering of checkpoints
  • Fix LoRA menu appearing on load
  • Fix DetailView image double-split issue
  • Deselect selectedImage on default startup
  • Local Database improvements
    • Started deprecating initial setup style
    • @Model item: @Attribute deterministicTag: Bool@Attribute parent: Node
    • isWorkspaceItem is now determined by workspaceFolder.contains
      • ie. item.isWorkspaceItemworkspaceFolder.contains { item }
    • modelContext.delete(item: someItem)parentFolder.remove(someItem)
  • Fix macOS deployment target
  • Improved typesafe symbol management
  • Improved Civit.ai parsing logic
    • Prioritize hash model comparison
    • Non-mapped object interfacing
    • Separate utility class for PastableService interface
  • And lots more!

buzsh and others added 30 commits March 4, 2024 12:05

@buzsh buzsh left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

In testing.

@buzsh buzsh left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Round 2

In review, testing.

@buzsh buzsh left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Approved.

@buzsh buzsh merged commit 3e848ec into main Mar 9, 2024
@buzsh buzsh deleted the refactor-swiftdata-model-context-dependencies branch March 9, 2024 00:01
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.

1 participant