|
|
@ -217,10 +217,17 @@ public class InvokeAI : BaseGitPackage |
|
|
|
|
|
|
|
|
|
|
|
var args = new List<Argument>(); |
|
|
|
var args = new List<Argument>(); |
|
|
|
if (exists) |
|
|
|
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("--upgrade"); |
|
|
|
args.Add("--force-reinstall"); |
|
|
|
args.Add("--force-reinstall"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await venvRunner |
|
|
|
await venvRunner |
|
|
|
.PipInstall( |
|
|
|
.PipInstall( |
|
|
|