aboutsummaryrefslogtreecommitdiff
path: root/modules/devices.py
AgeCommit message (Collapse)Author
2023-01-05Add support for PyTorch nightly and local buildsbrkirch
2022-12-17Add numpy fix for MPS on PyTorch 1.12.1brkirch
When saving training results with torch.save(), an exception is thrown: "RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead." So for MPS, check if Tensor.requires_grad and detach() if necessary.
2022-12-03add built-in extension systemAUTOMATIC
add support for adding upscalers in extensions move LDSR, ScuNET and SwinIR to built-in extensions
2022-12-03add comment for #4407 and remove seemingly unnecessary cudnn.enabledAUTOMATIC
2022-12-03fix #4407 breaking UI entirely for card other than ones related to the PRAUTOMATIC
2022-12-03Merge pull request #4407 from yoinked-h/patch-1AUTOMATIC1111
Fix issue with 16xx cards
2022-11-30Rework MPS randn fix, add randn_like fixbrkirch
torch.manual_seed() already sets a CPU generator, so there is no reason to create a CPU generator manually. torch.randn_like also needs a MPS fix for k-diffusion, but a torch hijack with randn_like already exists so it can also be used for that.
2022-11-27Merge pull request #4918 from brkirch/pytorch-fixesAUTOMATIC1111
Fixes for PyTorch 1.12.1 when using MPS
2022-11-27eliminate duplicated code from #5095AUTOMATIC
2022-11-26torch.cuda.empty_cache() defaults to cuda:0 device unless explicitly set ↵Matthew McGoogan
otherwise first. Updating torch_gc() to use the device set by --device-id if specified to avoid OOM edge cases on multi-GPU systems.
2022-11-21Add fixes for PyTorch 1.12.1brkirch
Fix typo "MasOS" -> "macOS" If MPS is available and PyTorch is an earlier version than 1.13: * Monkey patch torch.Tensor.to to ensure all tensors sent to MPS are contiguous * Monkey patch torch.nn.functional.layer_norm to ensure input tensor is contiguous (required for this program to work with MPS on unmodified PyTorch 1.12.1)
2022-11-17Revert "MPS Upscalers Fix"brkirch
This reverts commit 768b95394a8500da639b947508f78296524f1836.
2022-11-12change formatting to match the main program in devices.pyAUTOMATIC
2022-11-12Update devices.py源文雨
2022-11-12Fix wrong mps selection below MasOS 12.3源文雨
2022-11-08actual better fixpepe10-gpu
thanks C43H66N12O12S2
2022-11-07terrible hackpepe10-gpu
2022-11-0616xx card fixpepe10-gpu
cudnn
2022-10-25MPS Upscalers Fixbrkirch
Get ESRGAN, SCUNet, and SwinIR working correctly on MPS by ensuring memory is contiguous for tensor views before sending to MPS device.
2022-10-25Remove BSRGAN from --use-cpu, add SwinIRbrkirch
2022-10-22remove parsing command line from devices.pyAUTOMATIC
2022-10-22implement CUDA device selection by IDExtraltodeus
2022-10-14Add 'interrogate' and 'all' choices to --use-cpubrkirch
* Add 'interrogate' and 'all' choices to --use-cpu * Change type for --use-cpu argument to str.lower, so that choices are case insensitive
2022-10-10--no-half-vaeAUTOMATIC
2022-10-04Merge branch 'master' into cpu-cmdline-optbrkirch
2022-10-04send all three of GFPGAN's and codeformer's models to CPU memory instead of ↵AUTOMATIC
just one for #1283
2022-10-04Add BSRGAN to --add-cpubrkirch
2022-10-04Add --use-cpu command line optionbrkirch
Remove MPS detection to use CPU for GFPGAN / CodeFormer and add a --use-cpu command line option.
2022-10-04Merge branch 'master' into masterbrkirch
2022-10-02initial support for training textual inversionAUTOMATIC
2022-09-30When device is MPS, use CPU for GFPGAN insteadbrkirch
GFPGAN will not work if the device is MPS, so default to CPU instead.
2022-09-13first attempt to produce crrect seeds in batchAUTOMATIC
2022-09-12changes for #294AUTOMATIC
2022-09-12 Allow TF32 in CUDA for increased performance #279AUTOMATIC
2022-09-11add half() supporrt for CLIP interrogationAUTOMATIC
2022-09-11CLIP interrogatorAUTOMATIC
2022-09-11Modular device managementAbdullah Barhoum