diff --git a/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs
index 41750364..e037408e 100644
--- a/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs
+++ b/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs
@@ -97,9 +97,11 @@ public partial class RecommendedModelsViewModel : ContentDialogViewModelBase
new RecommendedModelItemViewModel
{
ModelVersion = model.ModelVersions.First(
- x => !x.BaseModel.Contains("Turbo", StringComparison.OrdinalIgnoreCase)
+ x =>
+ !x.BaseModel.Contains("Turbo", StringComparison.OrdinalIgnoreCase)
+ && !x.BaseModel.Contains("Lightning", StringComparison.OrdinalIgnoreCase)
),
- Author = $"by {model.Creator.Username}",
+ Author = $"by {model.Creator?.Username}",
CivitModel = model
}
)
diff --git a/StabilityMatrix.Avalonia/Views/CivitAiBrowserPage.axaml b/StabilityMatrix.Avalonia/Views/CivitAiBrowserPage.axaml
index ea6e563c..ba065242 100644
--- a/StabilityMatrix.Avalonia/Views/CivitAiBrowserPage.axaml
+++ b/StabilityMatrix.Avalonia/Views/CivitAiBrowserPage.axaml
@@ -319,11 +319,11 @@
Background="#66000000"
FontSize="16"
Foreground="{DynamicResource ThemeEldenRingOrangeColor}"
- Value="{Binding CivitModel.Stats.Rating}" />
+ Value="{Binding CivitModel.ModelVersionStats.Rating}" />
@@ -336,7 +336,7 @@
+ Text="{Binding CivitModel.ModelVersionStats.FavoriteCount, Converter={StaticResource KiloFormatterConverter}}" />
+ Value="{Binding ModelVersion.Stats.Rating}" />
diff --git a/StabilityMatrix.Core/Models/Api/CivitModel.cs b/StabilityMatrix.Core/Models/Api/CivitModel.cs
index 26e1afb2..be381d0c 100644
--- a/StabilityMatrix.Core/Models/Api/CivitModel.cs
+++ b/StabilityMatrix.Core/Models/Api/CivitModel.cs
@@ -48,9 +48,7 @@ public class CivitModel
var latestVersion = ModelVersions?.FirstOrDefault();
if (latestVersion?.Files != null && latestVersion.Files.Any())
{
- var latestModelFile = latestVersion.Files.FirstOrDefault(
- x => x.Type == CivitFileType.Model
- );
+ var latestModelFile = latestVersion.Files.FirstOrDefault(x => x.Type == CivitFileType.Model);
kbs = latestModelFile?.SizeKb ?? 0;
}
fullFilesSize = new FileSizeType(kbs);
@@ -65,4 +63,7 @@ public class CivitModel
ModelVersions != null && ModelVersions.Any()
? ModelVersions[0].BaseModel?.Replace("SD", "").Trim()
: string.Empty;
+
+ public CivitModelStats ModelVersionStats =>
+ ModelVersions != null && ModelVersions.Any() ? ModelVersions[0].Stats : new CivitModelStats();
}