Browse Source

Merge pull request #47 from LykosAI/model-download-hotfix

Release v2.0.4
fix-release-ci v2.0.4
JT 1 year ago committed by GitHub
parent
commit
3a64264a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      StabilityMatrix.Avalonia/ViewModels/Dialogs/CivitFileViewModel.cs
  2. 2
      StabilityMatrix.Avalonia/Views/Dialogs/SelectModelVersionDialog.axaml
  3. 2
      StabilityMatrix.Core/Models/Api/CivitFile.cs

1
StabilityMatrix.Avalonia/ViewModels/Dialogs/CivitFileViewModel.cs

@ -13,7 +13,6 @@ public partial class CivitFileViewModel : ObservableObject
public CivitFileViewModel(HashSet<string> installedModelHashes, CivitFile civitFile) public CivitFileViewModel(HashSet<string> installedModelHashes, CivitFile civitFile)
{ {
CivitFile = civitFile; CivitFile = civitFile;
CivitFile.Name = Path.GetFileNameWithoutExtension(CivitFile.Name);
IsInstalled = CivitFile is {Type: CivitFileType.Model, Hashes.BLAKE3: not null} && IsInstalled = CivitFile is {Type: CivitFileType.Model, Hashes.BLAKE3: not null} &&
installedModelHashes.Contains(CivitFile.Hashes.BLAKE3); installedModelHashes.Contains(CivitFile.Hashes.BLAKE3);
} }

2
StabilityMatrix.Avalonia/Views/Dialogs/SelectModelVersionDialog.axaml

@ -78,7 +78,7 @@
IsVisible="{Binding IsInstalled}" IsVisible="{Binding IsInstalled}"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
<TextBlock Grid.Row="0" Grid.Column="1" <TextBlock Grid.Row="0" Grid.Column="1"
Text="{Binding CivitFile.Name}" Text="{Binding CivitFile.DisplayName}"
Margin="0, 4, 0, 4" Margin="0, 4, 0, 4"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<TextBlock Grid.Row="1" Grid.Column="1" <TextBlock Grid.Row="1" Grid.Column="1"

2
StabilityMatrix.Core/Models/Api/CivitFile.cs

@ -41,4 +41,6 @@ public class CivitFile
return fullFilesSize; return fullFilesSize;
} }
} }
public string DisplayName => Path.GetFileNameWithoutExtension(Name);
} }

Loading…
Cancel
Save