Browse Source

fix invokeAI torch/cuda check so we don't reinstall torch every update

pull/263/head
JT 1 year ago
parent
commit
07610da00d
  1. 7
      StabilityMatrix.Core/Models/Packages/InvokeAI.cs

7
StabilityMatrix.Core/Models/Packages/InvokeAI.cs

@ -217,10 +217,17 @@ public class InvokeAI : BaseGitPackage
var args = new List<Argument>();
if (exists)
{
var pipPackages = await venvRunner.PipList().ConfigureAwait(false);
var hasCuda121 = pipPackages.Any(
p => p.Name == "torch" && p.Version.Contains("cu121")
);
if (!hasCuda121)
{
args.Add("--upgrade");
args.Add("--force-reinstall");
}
}
await venvRunner
.PipInstall(

Loading…
Cancel
Save