Skip to content

Commit

Permalink
Merge pull request #28 from the-database/dev
Browse files Browse the repository at this point in the history
use fixed versions for all deps
  • Loading branch information
the-database authored Jul 25, 2024
2 parents 715eb5e + af5581b commit aff2cb6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions MangaJaNaiConverterGui/Services/PythonService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,21 @@ public string InstallUpdatePythonDependenciesCommand
get
{
string[] dependencies = {
"spandrel^>=0.3.4",
"spandrel_extra_arches^>=0.1.1",
"opencv-python^>=4.10.0.84",
"pillow-avif-plugin^>=1.4.6",
"rarfile^>=4.2",
"multiprocess^>=0.70.16",
"chainner_ext^>=0.3.10",
"sanic^>=24.6.0",
"pynvml^>=11.5.3",
"psutil^>=6.0.0"
"spandrel==0.3.4",
"spandrel_extra_arches==0.1.1",
"opencv-python==4.10.0.84",
"pillow-avif-plugin==1.4.6",
"rarfile==4.2",
"multiprocess==0.70.16",
"chainner_ext==0.3.10",
"sanic==24.6.0",
"pynvml==11.5.3",
"psutil==6.0.0"
};

var relPythonPath = @".\python\python\python.exe";

return $@"{relPythonPath} -m pip install torch==2.3.1 torchvision^>=0.18.1 --index-url https://download.pytorch.org/whl/cu121 && {relPythonPath} -m pip install {string.Join(" ", dependencies)}";
return $@"{relPythonPath} -m pip install torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu121 && {relPythonPath} -m pip install {string.Join(" ", dependencies)}";
}
}

Expand Down
10 changes: 5 additions & 5 deletions MangaJaNaiConverterGui/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,11 @@ await Task.Run(async () =>
{
IsExtractingBackend = true;

if (!_pythonService.AreModelsInstalled())
{
await DownloadModels();
}

if (!_pythonService.IsPythonInstalled())
{
// Download Python tgz
Expand Down Expand Up @@ -942,11 +947,6 @@ await Downloader.DownloadFileAsync(download.Url, targetPath, (progress) =>
}
}

if (!_pythonService.AreModelsInstalled())
{
await DownloadModels();
}

IsExtractingBackend = false;
});

Expand Down

0 comments on commit aff2cb6

Please sign in to comment.