| Age | Commit message (Collapse) | Author | Lines | 
|---|
|  | import errors related to shared.py | 
|  |  | 
|  | device.randn_local and respect the NV setting. | 
|  | generate same pictures on CPU/AMD/Mac as on NVidia  videocards. | 
|  | Importing torch does not import torch.mps so the call failed. | 
|  | changed a bunch of places that use torch.cuda.empty_cache() to use torch_gc() instead | 
|  | As found by Vulture and some eyes | 
|  | impact of first generation | 
|  |  | 
|  | copypaste support to RNG source | 
|  | Makes a given manual seed generate the same images across different
platforms, independently of the GPU architecture in use.
Fixes #9613. | 
|  | Move most Mac related code to a separate file, don't even load it unless web UI is run under macOS. | 
|  |  | 
|  | Apparently I did not test with large enough images to trigger the bug with torch.narrow on MPS | 
|  | Fix embeddings, upscalers, and refactor `--upcast-sampling` | 
|  | The torch.narrow fix was required for nightly PyTorch builds for a while to prevent a hard crash, but newer nightly builds don't have this issue. | 
|  |  | 
|  |  | 
|  |  | 
|  | Adds "Upcast cross attention layer to float32" option in Stable Diffusion settings. This allows for generating images using SD 2.1 models without --no-half or xFormers.
In order to make upcasting cross attention layer optimizations possible it is necessary to indent several sections of code in sd_hijack_optimizations.py so that a context manager can be used to disable autocast. Also, even though Stable Diffusion (and Diffusers) only upcast q and k, unfortunately my findings were that most of the cross attention layer optimizations could not function unless v is upcast also. | 
|  | This also handles type casting so that ROCm and MPS torch devices work correctly without --no-half. One cast is required for deepbooru in deepbooru_model.py, some explicit casting is required for img2img and inpainting. depth_model can't be converted to float16 or it won't work correctly on some systems (it's known to have issues on MPS) so in sd_models.py model.depth_model is removed for model.half(). | 
|  | Improve cumsum fix for MPS | 
|  | The prior fix assumed that testing int16 was enough to determine if a fix is needed, but a recent fix for cumsum has int16 working but not bool. | 
|  |  | 
|  |  | 
|  |  | 
|  | 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. | 
|  | add support for adding upscalers in extensions
move LDSR, ScuNET and SwinIR to built-in extensions | 
|  |  | 
|  |  | 
|  | Fix issue with 16xx cards | 
|  | 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. | 
|  | Fixes for PyTorch 1.12.1 when using MPS | 
|  |  | 
|  | otherwise first. Updating torch_gc() to use the device set by --device-id if specified to avoid OOM edge cases on multi-GPU systems. | 
|  | 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) | 
|  | This reverts commit 768b95394a8500da639b947508f78296524f1836. | 
|  |  | 
|  |  | 
|  |  | 
|  | thanks C43H66N12O12S2 | 
|  |  | 
|  | cudnn | 
|  | Get ESRGAN, SCUNet, and SwinIR working correctly on MPS by ensuring memory is contiguous for tensor views before sending to MPS device. | 
|  |  | 
|  |  | 
|  |  | 
|  | * Add 'interrogate' and 'all' choices to --use-cpu
* Change type for --use-cpu argument to str.lower, so that choices are case insensitive | 
|  |  | 
|  |  |