Skip to content

Commit

Permalink
Merge pull request #876 from ionite34/backport/main/pr-875
Browse files Browse the repository at this point in the history
[dev to main] backport: don't use binary search & fix some other misc errors (875)
  • Loading branch information
mohnjiles authored Nov 5, 2024
2 parents 880593d + 761097c commit 5b8d75b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
- Fixed some cases of FileTransferExists error when running re/Forge or Automatic1111
- Fixed update check not happening on startup for some users
- Fixed error when installing Automatic1111 on macOS
- Fixed some instances of Civitai model browser not loading new results
- Fixed "Unsupported Torch Version: Cuda" errors when installing a1111

## v2.12.2
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ or nameof(HideEarlyAccessModels)
)
.DisposeMany()
.Filter(filterPredicate)
.SortAndBind(ModelCards, sortPredicate, new SortAndBindOptions { UseBinarySearch = true })
.SortAndBind(ModelCards, sortPredicate)
.Subscribe();

settingsManager.RelayPropertyFor(
Expand Down
4 changes: 2 additions & 2 deletions StabilityMatrix.Core/Models/Packages/A3WebUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public override async Task InstallPackage(
var torchVersion = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion();

var requirements = new FilePath(installLocation, "requirements_versions.txt");
var pipArgs = options.PythonOptions.TorchIndex switch
var pipArgs = torchVersion switch
{
TorchIndex.Mps
=> new PipInstallArgs()
Expand All @@ -227,7 +227,7 @@ await requirements.ReadAllTextAsync(cancellationToken).ConfigureAwait(false),
.WithTorch("==2.1.2")
.WithTorchVision("==0.16.2")
.WithTorchExtraIndex(
options.PythonOptions.TorchIndex switch
torchVersion switch
{
TorchIndex.Cpu => "cpu",
TorchIndex.Cuda => "cu121",
Expand Down
3 changes: 2 additions & 1 deletion StabilityMatrix.Core/Models/Packages/OneTrainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public override async Task InstallPackage(
await using var venvRunner = await SetupVenvPure(installLocation).ConfigureAwait(false);

progress?.Report(new ProgressReport(-1f, "Installing requirements", isIndeterminate: true));
var requirementsFileName = options.PythonOptions.TorchIndex switch
var torchVersion = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion();
var requirementsFileName = torchVersion switch
{
TorchIndex.Cuda => "requirements-cuda.txt",
TorchIndex.Rocm => "requirements-rocm.txt",
Expand Down

0 comments on commit 5b8d75b

Please sign in to comment.