LykosAI / StabilityMatrix

Multi-Platform Package Manager for Stable Diffusion
https://lykos.ai
GNU Affero General Public License v3.0
4.45k stars 288 forks source link

Crash 2.11.2 #715

Closed Cronosus closed 3 months ago

Cronosus commented 3 months ago

hi, i have repeated crash with latest version, when i click on checkpoint manager, and sometimes even on model manager.

`## Exception LiteAsyncException: LiteDB encounter an error. Details in the inner exception.

Sentry ID

4a26f6d5c83e4d7b8c1fbce42898aee5

Stack Trace

   at StabilityMatrix.Core.Services.ModelIndexService.RefreshIndexParallelCore()
   at StabilityMatrix.Avalonia.ViewModels.CheckpointsPageViewModel.Refresh()
   at AsyncAwaitBestPractices.SafeFireAndForgetExtensions.HandleSafeFireAndForget[TException](Task task, Boolean continueOnCapturedContext, Action`1 onException)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
   at Avalonia.Threading.DispatcherOperation.Execute()
   at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
   at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
   at Avalonia.Threading.Dispatcher.Signaled()
   at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
   at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at StabilityMatrix.Avalonia.Program.Main(String[] args)

Inner Exception

ArgumentException: Requested value 'Training_Data' was not found.

Stack Trace

   at System.Enum.TryParseByName[TStorage](RuntimeType enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, TStorage& result)
   at System.Enum.TryParseByValueOrName[TUnderlying,TStorage](RuntimeType enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, TUnderlying& result)
   at System.Enum.TryParse(Type enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, Object& result)
   at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
   at LiteDB.BsonMapper.DeserializeObject(EntityMapper entity, Object obj, BsonDocument value)
   at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
   at LiteDB.BsonMapper.DeserializeList(Type type, BsonArray value)
   at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
   at LiteDB.BsonMapper.DeserializeObject(EntityMapper entity, Object obj, BsonDocument value)
   at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
   at LiteDB.BsonMapper.DeserializeList(Type type, BsonArray value)
   at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
   at LiteDB.BsonMapper.DeserializeObject(EntityMapper entity, Object obj, BsonDocument value)
   at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
   at LiteDB.LiteQueryable`1.<ToEnumerable>b__27_2(BsonDocument x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at LiteDB.LiteCollection`1.FindById(BsonValue id)
   at LiteDB.Async.LiteDatabaseAsync.<>c__DisplayClass36_0`1.<EnqueueAsync>g__Function|0()

`

ionite34 commented 3 months ago

Sorry about this, it's due to a change in one of the database models for the updated civitai api. We're working on an automated fix for existing database, but for now you can follow this to fix the issue:

  1. Go to Settings > App Folders > Data Directory to open in explorer
  2. Close Stability Matrix
  3. Delete the StabilityMatrix.db file
  4. Relaunch Stability Matrix

The database file only includes cached information which can all be retrieved again when searching or reindexing your models, so there should be no loss of information.

ionite34 commented 3 months ago

Closing as duplicate of https://github.com/LykosAI/StabilityMatrix/issues/683