|
|
|
@ -5,6 +5,7 @@ using System.Collections.ObjectModel;
|
|
|
|
|
using System.Diagnostics.CodeAnalysis; |
|
|
|
|
using System.IO; |
|
|
|
|
using System.Net.Http; |
|
|
|
|
using DynamicData.Binding; |
|
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
|
using StabilityMatrix.Avalonia.Models; |
|
|
|
|
using StabilityMatrix.Avalonia.Services; |
|
|
|
@ -166,65 +167,72 @@ public static class DesignData
|
|
|
|
|
InstallerViewModel.ReleaseNotes = "## Release Notes\nThis is a test release note."; |
|
|
|
|
|
|
|
|
|
// Checkpoints page |
|
|
|
|
CheckpointsPageViewModel.CheckpointFolders = new ObservableCollection<CheckpointFolder> |
|
|
|
|
{ |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
CheckpointsPageViewModel.CheckpointFolders = |
|
|
|
|
new ObservableCollectionExtended<CheckpointFolder> |
|
|
|
|
{ |
|
|
|
|
Title = "StableDiffusion", |
|
|
|
|
DirectoryPath = "Models/StableDiffusion", |
|
|
|
|
CheckpointFiles = new AdvancedObservableList<CheckpointFile> |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
{ |
|
|
|
|
new() |
|
|
|
|
Title = "StableDiffusion", |
|
|
|
|
DirectoryPath = "Models/StableDiffusion", |
|
|
|
|
CheckpointFiles = new AdvancedObservableList<CheckpointFile> |
|
|
|
|
{ |
|
|
|
|
FilePath = "~/Models/StableDiffusion/electricity-light.safetensors", |
|
|
|
|
Title = "Auroral Background", |
|
|
|
|
PreviewImagePath = |
|
|
|
|
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/" |
|
|
|
|
+ "78fd2a0a-42b6-42b0-9815-81cb11bb3d05/00009-2423234823.jpeg", |
|
|
|
|
ConnectedModel = new ConnectedModelInfo |
|
|
|
|
new() |
|
|
|
|
{ |
|
|
|
|
VersionName = "Lightning Auroral", |
|
|
|
|
BaseModel = "SD 1.5", |
|
|
|
|
ModelName = "Auroral Background", |
|
|
|
|
ModelType = CivitModelType.Model, |
|
|
|
|
FileMetadata = new CivitFileMetadata |
|
|
|
|
FilePath = "~/Models/StableDiffusion/electricity-light.safetensors", |
|
|
|
|
Title = "Auroral Background", |
|
|
|
|
PreviewImagePath = |
|
|
|
|
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/" |
|
|
|
|
+ "78fd2a0a-42b6-42b0-9815-81cb11bb3d05/00009-2423234823.jpeg", |
|
|
|
|
ConnectedModel = new ConnectedModelInfo |
|
|
|
|
{ |
|
|
|
|
Format = CivitModelFormat.SafeTensor, |
|
|
|
|
Fp = CivitModelFpType.fp16, |
|
|
|
|
Size = CivitModelSize.pruned, |
|
|
|
|
VersionName = "Lightning Auroral", |
|
|
|
|
BaseModel = "SD 1.5", |
|
|
|
|
ModelName = "Auroral Background", |
|
|
|
|
ModelType = CivitModelType.Model, |
|
|
|
|
FileMetadata = new CivitFileMetadata |
|
|
|
|
{ |
|
|
|
|
Format = CivitModelFormat.SafeTensor, |
|
|
|
|
Fp = CivitModelFpType.fp16, |
|
|
|
|
Size = CivitModelSize.pruned, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
new() |
|
|
|
|
{ |
|
|
|
|
FilePath = "~/Models/Lora/model.safetensors", |
|
|
|
|
Title = "Some model" |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
new() { FilePath = "~/Models/Lora/model.safetensors", Title = "Some model" }, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
{ |
|
|
|
|
Title = "Lora", |
|
|
|
|
DirectoryPath = "Packages/Lora", |
|
|
|
|
SubFolders = new AdvancedObservableList<CheckpointFolder>() |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
{ |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
Title = "Lora", |
|
|
|
|
DirectoryPath = "Packages/Lora", |
|
|
|
|
SubFolders = new AdvancedObservableList<CheckpointFolder>() |
|
|
|
|
{ |
|
|
|
|
Title = "StableDiffusion", |
|
|
|
|
DirectoryPath = "Packages/Lora/Subfolder", |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
{ |
|
|
|
|
Title = "StableDiffusion", |
|
|
|
|
DirectoryPath = "Packages/Lora/Subfolder", |
|
|
|
|
}, |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
{ |
|
|
|
|
Title = "Lora", |
|
|
|
|
DirectoryPath = "Packages/StableDiffusion/Subfolder", |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
new(settingsManager, downloadService, modelFinder, notificationService) |
|
|
|
|
CheckpointFiles = new AdvancedObservableList<CheckpointFile> |
|
|
|
|
{ |
|
|
|
|
Title = "Lora", |
|
|
|
|
DirectoryPath = "Packages/StableDiffusion/Subfolder", |
|
|
|
|
new() { FilePath = "~/Models/Lora/lora_v2.pt", Title = "Best Lora v2", } |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
CheckpointFiles = new AdvancedObservableList<CheckpointFile> |
|
|
|
|
{ |
|
|
|
|
new() { FilePath = "~/Models/Lora/lora_v2.pt", Title = "Best Lora v2", } |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
foreach (var folder in CheckpointsPageViewModel.CheckpointFolders) |
|
|
|
|
{ |
|
|
|
|
folder.DisplayedCheckpointFiles = folder.CheckpointFiles; |
|
|
|
|
folder.DisplayedCheckpointFiles = new AdvancedObservableList<CheckpointFile>( |
|
|
|
|
folder.CheckpointFiles |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CheckpointBrowserViewModel.ModelCards = |
|
|
|
|