From 1a8fd000f53f0b609b44d66524f881689e58aaac Mon Sep 17 00:00:00 2001 From: JT Date: Sat, 27 Jan 2024 15:02:07 -0800 Subject: [PATCH 1/2] Updated torch version for A1111, fixed vlad update maybe, updated Fooocus launch args, and fixed OneClickInstallFinished event not firing --- CHANGELOG.md | 4 ++ .../Languages/Resources.fr-FR.resx | 62 ++++++++++++++----- .../ViewModels/MainWindowViewModel.cs | 1 - .../PackageInstallProgressItemViewModel.cs | 5 +- .../Models/Packages/A3WebUI.cs | 19 ++++-- .../Models/Packages/Fooocus.cs | 43 +++++++++++-- .../Models/Packages/VladAutomatic.cs | 29 +++------ 7 files changed, 116 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7487fe55..e67b1ef0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,14 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2 ## v2.8.0-pre.4 ### Added - Added Recommended Models dialog after one-click installer +- Added new launch argument options for Fooocus ### Changed - Changed one-click installer to match the new package installation style +- Automatic1111 packages will now use PyTorch v2.1.2. Upgrade will occur during the next package update or upon fresh installation. +- Updated French translation with the latest changes ### Fixed - Fixed Environment Variables not being editable +- Fixed potential SD.Next update issues by moving to shared update process ## v2.8.0-pre.3 ### Added diff --git a/StabilityMatrix.Avalonia/Languages/Resources.fr-FR.resx b/StabilityMatrix.Avalonia/Languages/Resources.fr-FR.resx index f971db52..b8eee78d 100644 --- a/StabilityMatrix.Avalonia/Languages/Resources.fr-FR.resx +++ b/StabilityMatrix.Avalonia/Languages/Resources.fr-FR.resx @@ -169,10 +169,10 @@ Glisser-déposer les checkpoints ici pour les importer - Accentuation + Emphase - Désaccentuation + Emphase inverse Emebeddings / Inversion textuelle @@ -379,10 +379,10 @@ Déposer le fichier ici pour l'importer - Importer en tant que connecté + Importer avec les métadonnées - Recherche de métadonnées connectées sur les nouvelles importations locales + Recherche de métadonnées en ligne sur les nouvelles importations locales Indexation... @@ -403,10 +403,10 @@ Accord de licence. - Trouver des métadonnées connectées + Trouver des métadonnées en ligne - Afficher les images du modèle + Afficher les vignettes Apparence @@ -448,13 +448,14 @@ Intégrations - Présence riche en discorde + Activer Statut Discord Système - Ajouter la matrice de stabilité au menu de démarrage + Ajouter Stability Matrix au menu de démarrage + updated because "Stability Matrix" was translated in french here haha Utilise l'emplacement actuel de l'application, vous pouvez relancer cette opération si vous déplacez l'application. @@ -521,6 +522,7 @@ Choisissez votre interface préférée et cliquez sur Installer pour commencer. + Fuzzy Installation @@ -556,7 +558,8 @@ Vérifier les mises à jour - Mise à jour + Mettre à jour + switched to verb as it's action label Ajouter un paquet @@ -598,7 +601,7 @@ Redémarrage - Confirmer Supprimer + Confirmer la suppression Cette opération va supprimer le dossier du paquet et tout son contenu, y compris les images générées et les fichiers que vous avez éventuellement ajoutés. @@ -640,7 +643,7 @@ Branche - Défilement automatique jusqu'à la fin de la sortie de la console + Défilement automatique jusqu'à la dernière sortie de la console Licence @@ -667,10 +670,10 @@ Installer maintenant - Notes de mise à jour + Notes de version - Projet ouvert... + Ouvrir projet... Enregistrer sous... @@ -716,7 +719,7 @@ Amélioration de qualité - Explorateur des générations + Explorateur de génération 1 image sélectionnée @@ -792,6 +795,12 @@ Mises à jour automatiques + + Pour les early adopters. Version de preview, plus stable que les versions de développement et plus proche des versions stables. Vos retours vont grandement nous aider à identifier des problèmes et ajuster les éléments de design. + + + Pour les utilisateurs expérimentés. Soyez parmis les premiers à accéder aux builds développement incluants les branches de fonctionnalités dès qu'elles sont disponibles. Il peut y avoir quelques disfonctionnements et bugs au fur et à mesure que nous expérimentons de nouvelles fonctionnalités. + Mises à jour @@ -811,6 +820,20 @@ Générale A general settings category + + Inférence + The Inference feature page + + + Instruction + A settings category for Inference generation prompts + + + Visionneuse d'images + + + Auto-complétion + Informations système @@ -824,6 +847,10 @@ Modules complémentaires Inference Sampler Addons + + Sauvegarder les images intermédiaires + Inference module step to save an intermediate image + Paramètres @@ -854,6 +881,13 @@ Sans perte + + Images + What is the context on this one ? + + + Motion Bucket ID + Méthode diff --git a/StabilityMatrix.Avalonia/ViewModels/MainWindowViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/MainWindowViewModel.cs index 383aef9e..01a6a182 100644 --- a/StabilityMatrix.Avalonia/ViewModels/MainWindowViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/MainWindowViewModel.cs @@ -141,7 +141,6 @@ public partial class MainWindowViewModel : ViewModelBase EventManager.Instance.OneClickInstallFinished += (_, skipped) => { - dialog.Hide(); if (skipped) return; diff --git a/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs index 7148378f..d8567778 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs @@ -47,7 +47,10 @@ public class PackageInstallProgressItemViewModel : ProgressItemViewModelBase if (packageSteps is { Count: > 0 }) { - packageModificationRunner.ExecuteSteps(packageSteps).SafeFireAndForget(); + packageModificationRunner + .ExecuteSteps(packageSteps) + .ContinueWith(_ => EventManager.Instance.OnOneClickInstallFinished(false)) + .SafeFireAndForget(); } } diff --git a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs index fcc9f5cc..79a0d0fe 100644 --- a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs +++ b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs @@ -190,6 +190,9 @@ public class A3WebUI( { progress?.Report(new ProgressReport(-1f, "Setting up venv", isIndeterminate: true)); + var venvPath = Path.Combine(installLocation, "venv"); + var exists = Directory.Exists(venvPath); + var venvRunner = await SetupVenv(installLocation, forceRecreate: true).ConfigureAwait(false); await venvRunner.PipInstall("--upgrade pip wheel", onConsoleOutput).ConfigureAwait(false); @@ -197,14 +200,14 @@ public class A3WebUI( var requirements = new FilePath(installLocation, "requirements_versions.txt"); var pipArgs = new PipInstallArgs() - .WithTorch("==2.0.1") - .WithTorchVision("==0.15.2") + .WithTorch("==2.1.2") + .WithTorchVision("==0.16.2") .WithTorchExtraIndex( torchVersion switch { TorchVersion.Cpu => "cpu", - TorchVersion.Cuda => "cu118", - TorchVersion.Rocm => "rocm5.1.1", + TorchVersion.Cuda => "cu121", + TorchVersion.Rocm => "rocm5.6", _ => throw new ArgumentOutOfRangeException(nameof(torchVersion), torchVersion, null) } ) @@ -215,7 +218,7 @@ public class A3WebUI( if (torchVersion == TorchVersion.Cuda) { - pipArgs = pipArgs.WithXFormers("==0.0.20"); + pipArgs = pipArgs.WithXFormers("==0.0.23.post1"); } // v1.6.0 needs a httpx qualifier to fix a gradio issue @@ -227,6 +230,12 @@ public class A3WebUI( // Add jsonmerge to fix https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12482 pipArgs = pipArgs.AddArg("jsonmerge"); + if (exists) + { + pipArgs = pipArgs.AddArg("--upgrade"); + pipArgs = pipArgs.AddArg("--force-reinstall"); + } + await venvRunner.PipInstall(pipArgs, onConsoleOutput).ConfigureAwait(false); progress?.Report(new ProgressReport(-1f, "Updating configuration", isIndeterminate: true)); diff --git a/StabilityMatrix.Core/Models/Packages/Fooocus.cs b/StabilityMatrix.Core/Models/Packages/Fooocus.cs index 5df46736..f32b89c2 100644 --- a/StabilityMatrix.Core/Models/Packages/Fooocus.cs +++ b/StabilityMatrix.Core/Models/Packages/Fooocus.cs @@ -75,6 +75,43 @@ public class Fooocus( Description = "Override the output directory", Options = { "--output-directory" } }, + new LaunchOptionDefinition + { + Name = "Language", + Type = LaunchOptionType.String, + Description = "Change the language of the UI", + Options = { "--language" } + }, + new LaunchOptionDefinition + { + Name = "Auto-Launch", + Type = LaunchOptionType.Bool, + Options = { "--auto-launch" } + }, + new LaunchOptionDefinition + { + Name = "Disable Image Log", + Type = LaunchOptionType.Bool, + Options = { "--disable-image-log" } + }, + new LaunchOptionDefinition + { + Name = "Disable Analytics", + Type = LaunchOptionType.Bool, + Options = { "--disable-analytics" } + }, + new LaunchOptionDefinition + { + Name = "Disable Preset Model Downloads", + Type = LaunchOptionType.Bool, + Options = { "--disable-preset-download" } + }, + new LaunchOptionDefinition + { + Name = "Always Download Newer Models", + Type = LaunchOptionType.Bool, + Options = { "--always-download-new-model" } + }, new() { Name = "VRAM", @@ -108,12 +145,6 @@ public class Fooocus( InitialValue = !HardwareHelper.HasNvidiaGpu(), Options = { "--disable-xformers" } }, - new LaunchOptionDefinition - { - Name = "Auto-Launch", - Type = LaunchOptionType.Bool, - Options = { "--auto-launch" } - }, LaunchOptionDefinition.Extras }; diff --git a/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs b/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs index 96b65c42..6aa2c0dc 100644 --- a/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs +++ b/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs @@ -306,21 +306,14 @@ public class VladAutomatic( Action? onConsoleOutput = null ) { - progress?.Report( - new ProgressReport( - -1f, - message: "Downloading package update...", - isIndeterminate: true, - type: ProgressType.Update - ) - ); - - await PrerequisiteHelper - .RunGit( - new[] { "checkout", versionOptions.BranchName! }, - onConsoleOutput, - installedPackage.FullPath - ) + var baseUpdateResult = await base.Update( + installedPackage, + torchVersion, + versionOptions, + progress, + includePrerelease, + onConsoleOutput + ) .ConfigureAwait(false); var venvRunner = new PyVenvRunner(Path.Combine(installedPackage.FullPath!, "venv")); @@ -361,11 +354,7 @@ public class VladAutomatic( ); } - return new InstalledPackageVersion - { - InstalledBranch = installedPackage.Version.InstalledBranch, - IsPrerelease = false - }; + return baseUpdateResult; } public override Task SetupModelFolders( From 83994c938421a6292f297a2a9dfc805ab80d3f50 Mon Sep 17 00:00:00 2001 From: JT Date: Sat, 27 Jan 2024 15:57:13 -0800 Subject: [PATCH 2/2] refactored non-blocking post-install stuff & added isInferenceInstall to new one click --- .../Dialogs/NewOneClickInstallViewModel.cs | 37 +++++++++++++++++-- .../Dialogs/RecommendedModelsViewModel.cs | 9 ++++- .../PackageInstallProgressItemViewModel.cs | 20 ++++++---- .../Progress/ProgressManagerViewModel.cs | 10 +++-- .../Dialogs/NewOneClickInstallDialog.axaml.cs | 1 + .../Dialogs/RecommendedModelsDialog.axaml | 19 +++++++++- StabilityMatrix.Core/Helper/EventManager.cs | 8 ++-- .../Models/Packages/BaseGitPackage.cs | 4 +- 8 files changed, 85 insertions(+), 23 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/Dialogs/NewOneClickInstallViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Dialogs/NewOneClickInstallViewModel.cs index d5ab4271..e3cb720a 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Dialogs/NewOneClickInstallViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Dialogs/NewOneClickInstallViewModel.cs @@ -5,11 +5,13 @@ using System.IO; using System.Linq; using System.Reactive.Linq; using System.Threading.Tasks; +using Avalonia.Threading; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using DynamicData; using DynamicData.Binding; using Microsoft.Extensions.Logging; +using StabilityMatrix.Avalonia.Services; using StabilityMatrix.Avalonia.ViewModels.Base; using StabilityMatrix.Avalonia.Views.Dialogs; using StabilityMatrix.Core.Attributes; @@ -29,10 +31,12 @@ namespace StabilityMatrix.Avalonia.ViewModels.Dialogs; [ManagedService] public partial class NewOneClickInstallViewModel : ContentDialogViewModelBase { + private readonly IPackageFactory packageFactory; private readonly ISettingsManager settingsManager; private readonly IPrerequisiteHelper prerequisiteHelper; private readonly ILogger logger; private readonly IPyRunner pyRunner; + private readonly INavigationService navigationService; public SourceCache AllPackagesCache { get; } = new(p => p.Author + p.Name); public IObservableCollection ShownPackages { get; set; } = @@ -41,18 +45,23 @@ public partial class NewOneClickInstallViewModel : ContentDialogViewModelBase [ObservableProperty] private bool showIncompatiblePackages; + private bool isInferenceInstall; + public NewOneClickInstallViewModel( IPackageFactory packageFactory, ISettingsManager settingsManager, IPrerequisiteHelper prerequisiteHelper, ILogger logger, - IPyRunner pyRunner + IPyRunner pyRunner, + INavigationService navigationService ) { + this.packageFactory = packageFactory; this.settingsManager = settingsManager; this.prerequisiteHelper = prerequisiteHelper; this.logger = logger; this.pyRunner = pyRunner; + this.navigationService = navigationService; var incompatiblePredicate = this.WhenPropertyChanged(vm => vm.ShowIncompatiblePackages) .Select(_ => new Func(p => p.IsCompatible || ShowIncompatiblePackages)) @@ -75,10 +84,14 @@ public partial class NewOneClickInstallViewModel : ContentDialogViewModelBase } [RelayCommand] - private Task InstallComfyForInference() + private async Task InstallComfyForInference() { var comfyPackage = ShownPackages.FirstOrDefault(x => x is ComfyUI); - return comfyPackage != null ? InstallPackage(comfyPackage) : Task.CompletedTask; + if (comfyPackage == null) + return; + + isInferenceInstall = true; + await InstallPackage(comfyPackage); } [RelayCommand] @@ -150,7 +163,23 @@ public partial class NewOneClickInstallViewModel : ContentDialogViewModelBase steps.Add(addInstalledPackageStep); var runner = new PackageModificationRunner { ShowDialogOnStart = false, HideCloseButton = false, }; - EventManager.Instance.OnAddPackageInstallWithoutBlocking(this, runner, steps); + EventManager.Instance.OnAddPackageInstallWithoutBlocking( + this, + runner, + steps, + () => + { + EventManager.Instance.OnOneClickInstallFinished(false); + + if (!isInferenceInstall) + return; + + Dispatcher.UIThread.Post(() => + { + navigationService.NavigateTo(); + }); + } + ); OnPrimaryButtonClick(); } diff --git a/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs index 4b915e6c..3ae964a4 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; using Avalonia.Controls; +using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using DynamicData; using DynamicData.Binding; @@ -40,6 +41,9 @@ public partial class RecommendedModelsViewModel : ContentDialogViewModelBase public IObservableCollection SdxlModels { get; } = new ObservableCollectionExtended(); + [ObservableProperty] + private bool isLoading; + public RecommendedModelsViewModel( ILogger logger, ILykosAuthApi lykosApi, @@ -80,8 +84,7 @@ public partial class RecommendedModelsViewModel : ContentDialogViewModelBase if (Design.IsDesignMode) return; - // See if query is cached - CivitModelQueryCacheEntry? cachedQuery = null; + IsLoading = true; var recommendedModels = await lykosApi.GetRecommendedModels(); @@ -98,6 +101,8 @@ public partial class RecommendedModelsViewModel : ContentDialogViewModelBase } ) ); + + IsLoading = false; } [RelayCommand] diff --git a/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs index d8567778..6b4632fe 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Progress/PackageInstallProgressItemViewModel.cs @@ -23,7 +23,8 @@ public class PackageInstallProgressItemViewModel : ProgressItemViewModelBase public PackageInstallProgressItemViewModel( IPackageModificationRunner packageModificationRunner, - IReadOnlyList? packageSteps = null + IReadOnlyList? packageSteps = null, + Action? onCompleted = null ) { this.packageModificationRunner = packageModificationRunner; @@ -40,17 +41,22 @@ public class PackageInstallProgressItemViewModel : ProgressItemViewModelBase return; Progress.Console.StartUpdates(); - Progress.Console.Post(string.Join(Environment.NewLine, packageModificationRunner.ConsoleOutput)); packageModificationRunner.ProgressChanged += PackageModificationRunnerOnProgressChanged; - if (packageSteps is { Count: > 0 }) + if (packageSteps is not { Count: > 0 }) + return; + + var task = packageModificationRunner.ExecuteSteps(packageSteps); + + if (onCompleted is not null) + { + task.ContinueWith(_ => onCompleted.Invoke()).SafeFireAndForget(); + } + else { - packageModificationRunner - .ExecuteSteps(packageSteps) - .ContinueWith(_ => EventManager.Instance.OnOneClickInstallFinished(false)) - .SafeFireAndForget(); + task.SafeFireAndForget(); } } diff --git a/StabilityMatrix.Avalonia/ViewModels/Progress/ProgressManagerViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Progress/ProgressManagerViewModel.cs index 671f6cf6..888a90de 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Progress/ProgressManagerViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Progress/ProgressManagerViewModel.cs @@ -70,8 +70,9 @@ public partial class ProgressManagerViewModel : PageViewModelBase private Task InstanceOnAddPackageInstallWithoutBlocking( object? sender, IPackageModificationRunner runner, - IReadOnlyList steps - ) => AddPackageInstall(runner, steps); + IReadOnlyList steps, + Action onCompleted + ) => AddPackageInstall(runner, steps, onCompleted); private void TrackedDownloadService_OnDownloadAdded(object? sender, TrackedDownload e) { @@ -174,7 +175,8 @@ public partial class ProgressManagerViewModel : PageViewModelBase private Task AddPackageInstall( IPackageModificationRunner packageModificationRunner, - IReadOnlyList? steps = null + IReadOnlyList? steps = null, + Action? onCompleted = null ) { if (ProgressItems.Any(vm => vm.Id == packageModificationRunner.Id)) @@ -182,7 +184,7 @@ public partial class ProgressManagerViewModel : PageViewModelBase return Task.CompletedTask; } - var vm = new PackageInstallProgressItemViewModel(packageModificationRunner, steps); + var vm = new PackageInstallProgressItemViewModel(packageModificationRunner, steps, onCompleted); ProgressItems.Add(vm); return packageModificationRunner.ShowDialogOnStart ? vm.ShowProgressDialog() : Task.CompletedTask; diff --git a/StabilityMatrix.Avalonia/Views/Dialogs/NewOneClickInstallDialog.axaml.cs b/StabilityMatrix.Avalonia/Views/Dialogs/NewOneClickInstallDialog.axaml.cs index 9930025a..2cfb9bad 100644 --- a/StabilityMatrix.Avalonia/Views/Dialogs/NewOneClickInstallDialog.axaml.cs +++ b/StabilityMatrix.Avalonia/Views/Dialogs/NewOneClickInstallDialog.axaml.cs @@ -41,6 +41,7 @@ public partial class NewOneClickInstallDialog : UserControlBase teachingTip.Target = comfyItem; teachingTip.IsOpen = true; + teachingTip.CloseButtonCommand = null; } } } diff --git a/StabilityMatrix.Avalonia/Views/Dialogs/RecommendedModelsDialog.axaml b/StabilityMatrix.Avalonia/Views/Dialogs/RecommendedModelsDialog.axaml index da8ff44c..252bb294 100644 --- a/StabilityMatrix.Avalonia/Views/Dialogs/RecommendedModelsDialog.axaml +++ b/StabilityMatrix.Avalonia/Views/Dialogs/RecommendedModelsDialog.axaml @@ -143,8 +143,16 @@ + + + + Margin="8" + IsVisible="{Binding !IsLoading}"> @@ -163,8 +171,15 @@ + + + Margin="8" + IsVisible="{Binding !IsLoading}"> diff --git a/StabilityMatrix.Core/Helper/EventManager.cs b/StabilityMatrix.Core/Helper/EventManager.cs index c02af155..ffee4497 100644 --- a/StabilityMatrix.Core/Helper/EventManager.cs +++ b/StabilityMatrix.Core/Helper/EventManager.cs @@ -30,7 +30,8 @@ public class EventManager public delegate Task AddPackageInstallEventHandler( object? sender, IPackageModificationRunner runner, - IReadOnlyList steps + IReadOnlyList steps, + Action onCompleted ); public event AddPackageInstallEventHandler? AddPackageInstallWithoutBlocking; public event EventHandler? ToggleProgressFlyout; @@ -97,8 +98,9 @@ public class EventManager public void OnAddPackageInstallWithoutBlocking( object? sender, IPackageModificationRunner runner, - IReadOnlyList steps - ) => AddPackageInstallWithoutBlocking?.Invoke(sender, runner, steps); + IReadOnlyList steps, + Action onCompleted + ) => AddPackageInstallWithoutBlocking?.Invoke(sender, runner, steps, onCompleted); public void OnDownloadsTeachingTipRequested() => DownloadsTeachingTipRequested?.Invoke(this, EventArgs.Empty); diff --git a/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs b/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs index 4e66f71c..86a103c5 100644 --- a/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs +++ b/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs @@ -76,11 +76,13 @@ public abstract class BaseGitPackage : BasePackage { if (ShouldIgnoreReleases) { + var commits = await GithubApi.GetAllCommits(Author, Name, MainBranch).ConfigureAwait(false); return new DownloadPackageVersionOptions { IsLatest = true, IsPrerelease = false, - BranchName = MainBranch + BranchName = MainBranch, + CommitHash = commits?.FirstOrDefault()?.Sha ?? "unknown" }; }