diff --git a/README.md b/README.md index eb9bcbac2..c4e55125d 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,21 @@ -[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/vladmandic) -![Last Commit](https://img.shields.io/github/last-commit/vladmandic/automatic?style=flat-square&svg=true) -![License](https://img.shields.io/github/license/vladmandic/automatic?style=flat-square&svg=true) -![GitHub Status Checks](https://img.shields.io/github/checks-status/vladmandic/automatic/main?style=flat-square&svg=true) -![Discord](https://img.shields.io/discord/1101998836328697867) - +
+ # SD.Next +**Stable Diffusion implementation with advanced features** +
+[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/vladmandic) +![Last Commit](https://img.shields.io/github/last-commit/vladmandic/automatic?svg=true) +![License](https://img.shields.io/github/license/vladmandic/automatic?svg=true) +![GitHub Status Checks](https://img.shields.io/github/checks-status/vladmandic/automatic/main?svg=true) +[![Discord](https://img.shields.io/discord/1101998836328697867?logo=Discord&svg=true)](https://discord.gg/VjvR2tabEX) -**Stable Diffusion implementation with modern UI and advanced features** +### [Docs](README.md#docs) | [Discord](https://discord.gg/VjvR2tabEX) | [Changelog](CHANGELOG.md) -This project started as a form from [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui/) and it grew siginificantly since then, but although it diverged significanly, any substantial features to original work is ported to this repository as well +
-Individual features are not listed here, instead check [Changelog](CHANGELOG.md) for full list of changes +This project started as a fork from [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui/) and it grew significantly since then, but although it diverged considerably, any substantial features to original work is ported to this repository as well. + +Individual features are not listed here, instead check [Changelog](CHANGELOG.md) for full list of changes. ## Platform support @@ -32,12 +37,13 @@ Individual features are not listed here, instead check [Changelog](CHANGELOG.md) `webui.bat` or `webui.sh`: - Platform specific wrapper scripts For Windows, Linux and OSX - Starts `sdnext.py` in a Python virtual environment (`venv`) - - Uses `install.py` to handle all actual requirements and dependencies - - *Note*: Server can run without virtual environment, but it is recommended to use it to avoid library version conflicts with other applications + - Uses `install.py` to handle all actual requirements and dependencies -*Note*: **nVidia/CUDA** and **AMD/ROCm** are auto-detected is present and available, but for any other use case specify required parameter explicitly or wrong packages may be installed as installer will assume CPU-only environment +> Server can run without virtual environment, but it is recommended to use it to avoid library version conflicts with other applications -Full startup sequence is logged in `sdnext.log`, so if you encounter any issues, please check it first +> **nVidia/CUDA** and **AMD/ROCm** are auto-detected is present and available, but for any other use case specify required parameter explicitly or wrong packages may be installed as installer will assume CPU-only environment. + +Full startup sequence is logged in `sdnext.log`, so if you encounter any issues, please check it first. Below is partial list of all available parameters, run `webui --help` for the full list: @@ -64,14 +70,16 @@ Below is partial list of all available parameters, run `webui --help` for the fu ### **Collab** - To avoid having this repo rely just on me, I'd love to have additional maintainers with full admin rights. If you're interested, ping me! -- In addition to general cross-platform code, desire is to have a lead for each of the main platforms -This should be fully cross-platform, but I would really love to have additional contibutors and/or maintainers to join and help lead the efforts on different platforms +- In addition to general cross-platform code, desire is to have a lead for each of the main platforms. +This should be fully cross-platform, but I would really love to have additional contibutors and/or maintainers to join and help lead the efforts on different platforms. ### **Goals** -The idea behind the fork is to enable latest technologies and advances in text-to-image generation -*Sometimes this is not the same as "as simple as possible to use"* -If you are looking an amazing simple-to-use Stable Diffusion tool, I'd suggest [InvokeAI](https://invoke-ai.github.io/InvokeAI/) specifically due to its automated installer and ease of use +The idea behind the fork is to enable latest technologies and advances in text-to-image generation. + +> *Sometimes this is not the same as "as simple as possible to use".* + +If you are looking an amazing simple-to-use Stable Diffusion tool, I'd suggest [InvokeAI](https://invoke-ai.github.io/InvokeAI/) specifically due to its automated installer and ease of use. General goals: @@ -95,6 +103,7 @@ General goals: ### **Docs** +- [Wiki](https://github.com/vladmandic/automatic/wiki) - [ReadMe](README.md) - [ToDo](TODO.md) - [Changelog](CHANGELOG.md) diff --git a/modules/devices.py b/modules/devices.py index ddd02fb28..dbc7b94a7 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -175,8 +175,10 @@ else: backend = 'cpu' if backend == 'ipex': - #Fix broken function in ipex 1.13.120+xpu + #Fix broken functions with ipex from modules.sd_hijack_utils import CondFunc + torch.cuda.empty_cache = torch.xpu.empty_cache + #Functions with dtype errors: CondFunc('torch.nn.modules.GroupNorm.forward', lambda orig_func, *args, **kwargs: orig_func(args[0], args[1].to(args[0].weight.data.dtype)), @@ -184,15 +186,20 @@ if backend == 'ipex': CondFunc('torch.nn.modules.Linear.forward', lambda orig_func, *args, **kwargs: orig_func(args[0], args[1].to(args[0].weight.data.dtype)), lambda *args, **kwargs: args[2].dtype != args[1].weight.data.dtype) + #Functions that does not work with the XPU: #UniPC: CondFunc('torch.linalg.solve', lambda orig_func, *args, **kwargs: orig_func(args[0].to("cpu"), args[1].to("cpu")).to(get_cuda_device_string()), lambda *args, **kwargs: args[1].device != torch.device("cpu")) #SDE Samplers: - CondFunc('torchsde._brownian.brownian_interval._randn', - lambda _, size, dtype, device, seed: torch.randn(size, dtype=dtype, device=device, generator=torch.xpu.Generator(device).manual_seed(int(seed))), - lambda _, size, dtype, device, seed: device != torch.device("cpu")) + CondFunc('torch.Generator', + lambda orig_func, device: torch.xpu.Generator(device), + lambda orig_func, device: device != torch.device("cpu") and device != "cpu") + #Diffusers Float64 (ARC GPUs doesn't support double or Float64): + CondFunc('torch.from_numpy', + lambda orig_func, *args, **kwargs: orig_func(args[0].astype('float32')), + lambda *args, **kwargs: args[1].dtype == float) #ControlNet: CondFunc('torch.batch_norm', lambda orig_func, *args, **kwargs: orig_func(args[0].to("cpu"),