diff --git a/README.md b/README.md index d146c3e07..64631948f 100644 --- a/README.md +++ b/README.md @@ -13,32 +13,49 @@
-## Notable features +## Table of contents + +- [Table of contents](#table-of-contents) +- [SD.Next Features](#sdnext-features) +- [Backend support](#backend-support) +- [Model support](#model-support) +- [Platform support](#platform-support) +- [Examples](#examples) +- [Install](#install) +- [Notes](#notes) + +## SD.Next Features All individual features are not listed here, instead check [ChangeLog](CHANGELOG.md) for full list of changes - Multiple backends! ▹ **Diffusers | Original** +- Multiple UIs! + ▹ **Standard | Modern** - Multiple diffusion models! ▹ **Stable Diffusion 1.5/2.1 | SD-XL | LCM | Segmind | Kandinsky | Pixart-α | Stable Cascade | Würstchen | aMUSEd | DeepFloyd IF | UniDiffusion | SD-Distilled | BLiP Diffusion | KOALA | etc.** - Built-in Control for Text, Image, Batch and video processing! ▹ **ControlNet | ControlNet XS | Control LLLite | T2I Adapters | IP Adapters** - Multiplatform! - ▹ **Windows | Linux | MacOS with CPU | nVidia | AMD | IntelArc | DirectML | OpenVINO | ONNX+Olive | ZLUDA** + ▹ **Windows | Linux | MacOS with CPU | nVidia | AMD | IntelArc/IPEX | DirectML | OpenVINO | ONNX+Olive | ZLUDA** - Platform specific autodetection and tuning performed on install - Optimized processing with latest `torch` developments with built-in support for `torch.compile` - and multiple compile backends: *Triton, ZLUDA, StableFast, DeepCache, OpenVINO, NNCF, IPEX* + and multiple compile backends: *Triton, ZLUDA, StableFast, DeepCache, OpenVINO, NNCF, IPEX, OneDiff* - Improved prompt parser - Enhanced *Lora*/*LoCon*/*Lyco* code supporting latest trends in training - Built-in queue management - Enterprise level logging and hardened API - Built in installer with automatic updates and dependency management - Modernized UI with theme support and number of built-in themes *(dark and light)* +- Mobile compatible
-*Main text2image interface*: +*Main interface using **StandardUI***: ![Screenshot-Dark](html/screenshot-text2image.jpg) +*Main interface using **ModernUI***: +![Screenshot-Dark](html/screenshot-modernui.jpg) + For screenshots and informations on other available themes, see [Themes Wiki](https://github.com/vladmandic/automatic/wiki/Themes)
@@ -89,6 +106,18 @@ Also supported are modifiers such as: - **InstantID**, **FaceSwap**, **FaceID**, **PhotoMerge** - **AnimateDiff** for SD 1.5 +## Platform support + +- *nVidia* GPUs using **CUDA** libraries on both *Windows and Linux* +- *AMD* GPUs using **ROCm** libraries on *Linux* + Support will be extended to *Windows* once AMD releases ROCm for Windows +- *Intel Arc* GPUs using **OneAPI** with *IPEX XPU* libraries on both *Windows and Linux* +- Any GPU compatible with *DirectX* on *Windows* using **DirectML** libraries + This includes support for AMD GPUs that are not supported by native ROCm libraries +- Any GPU or device compatible with **OpenVINO** libraries on both *Windows and Linux* +- *Apple M1/M2* on *OSX* using built-in support in Torch with **MPS** optimizations +- *ONNX/Olive* + ## Examples *IP Adapters*: @@ -107,18 +136,6 @@ Also supported are modifiers such as: > - For all other model types, use backend **Diffusers** and use built in Model downloader or select model from Networks -> Models -> Reference list in which case it will be auto-downloaded and loaded -## Platform support - -- *nVidia* GPUs using **CUDA** libraries on both *Windows and Linux* -- *AMD* GPUs using **ROCm** libraries on *Linux* - Support will be extended to *Windows* once AMD releases ROCm for Windows -- *Intel Arc* GPUs using **OneAPI** with *IPEX XPU* libraries on both *Windows and Linux* -- Any GPU compatible with *DirectX* on *Windows* using **DirectML** libraries - This includes support for AMD GPUs that are not supported by native ROCm libraries -- Any GPU or device compatible with **OpenVINO** libraries on both *Windows and Linux* -- *Apple M1/M2* on *OSX* using built-in support in Torch with **MPS** optimizations -- *ONNX/Olive* - ## Install - [Step-by-step install guide](https://github.com/vladmandic/automatic/wiki/Installation) @@ -223,7 +240,7 @@ List of available parameters, run `webui --help` for the full & up-to-date list: *Masking*: ![Screenshot-Mask](html/screenshot-mask.jpg) -### **Extensions** +### Extensions SD.Next comes with several extensions pre-installed: @@ -233,19 +250,19 @@ SD.Next comes with several extensions pre-installed: - [Agent Scheduler](https://github.com/ArtVentureX/sd-webui-agent-scheduler) - [Modern UI](https://github.com/BinaryQuantumSoul/sdnext-modernui) -### **Collab** +### Collab - We'd love to have additional maintainers (with comes with full repo rights). If you're interested, ping us! - 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 we'd really love to have additional contributors and/or maintainers to join and help lead the efforts on different platforms -### **Credits** +### Credits - Main credit goes to [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) for original codebase - Additional credits are listed in [Credits](https://github.com/AUTOMATIC1111/stable-diffusion-webui/#credits) - Licenses for modules are listed in [Licenses](html/licenses.html) -### **Evolution** +### Evolution @@ -256,7 +273,7 @@ This should be fully cross-platform, but we'd really love to have additional con - [OSS Stats](https://ossinsight.io/analyze/vladmandic/automatic#overview) -### **Docs** +### Docs If you're unsure how to use a feature, best place to start is [Wiki](https://github.com/vladmandic/automatic/wiki) and if its not there, check [ChangeLog](CHANGELOG.md) for when feature was first introduced as it will always have a short note on how to use it @@ -267,7 +284,7 @@ check [ChangeLog](CHANGELOG.md) for when feature was first introduced as it will - [ChangeLog](CHANGELOG.md) - [CLI Tools](cli/README.md) -### **Sponsors** +### Sponsors
Allan GrantBrent OzarMatthew RunoHELLO WORLD SASSalad Technologiesa.v.mantzarisJohnny Street diff --git a/extensions-builtin/Lora/extra_networks_lora.py b/extensions-builtin/Lora/extra_networks_lora.py index cb6989fb7..22d8265d7 100644 --- a/extensions-builtin/Lora/extra_networks_lora.py +++ b/extensions-builtin/Lora/extra_networks_lora.py @@ -1,6 +1,6 @@ +import re import time import numpy as np -import re import networks import lora_patches from modules import extra_networks, shared @@ -30,8 +30,6 @@ def get_stepwise(param, step, steps): step = (step) / (max_steps - step_offset) else: step = 1.0 - else: - step = step v = np.interp(step, m[1], m[0]) return v else: diff --git a/extensions-builtin/Lora/lyco_helpers.py b/extensions-builtin/Lora/lyco_helpers.py index e0e1afa78..a105695ff 100644 --- a/extensions-builtin/Lora/lyco_helpers.py +++ b/extensions-builtin/Lora/lyco_helpers.py @@ -65,4 +65,3 @@ def factorization(dimension: int, factor:int=-1) -> tuple[int, int]: if m > n: n, m = m, n return m, n - diff --git a/extensions-builtin/Lora/network_full.py b/extensions-builtin/Lora/network_full.py index ba9f2e359..346893706 100644 --- a/extensions-builtin/Lora/network_full.py +++ b/extensions-builtin/Lora/network_full.py @@ -9,7 +9,7 @@ class ModuleTypeFull(network.ModuleType): return None -class NetworkModuleFull(network.NetworkModule): +class NetworkModuleFull(network.NetworkModule): # pylint: disable=abstract-method def __init__(self, net: network.Network, weights: network.NetworkWeights): super().__init__(net, weights) diff --git a/extensions-builtin/Lora/network_hada.py b/extensions-builtin/Lora/network_hada.py index 4e5924d04..278436c5e 100644 --- a/extensions-builtin/Lora/network_hada.py +++ b/extensions-builtin/Lora/network_hada.py @@ -9,7 +9,7 @@ class ModuleTypeHada(network.ModuleType): return None -class NetworkModuleHada(network.NetworkModule): +class NetworkModuleHada(network.NetworkModule): # pylint: disable=abstract-method def __init__(self, net: network.Network, weights: network.NetworkWeights): super().__init__(net, weights) if hasattr(self.sd_module, 'weight'): diff --git a/extensions-builtin/Lora/network_ia3.py b/extensions-builtin/Lora/network_ia3.py index 75316d97c..61c05ca02 100644 --- a/extensions-builtin/Lora/network_ia3.py +++ b/extensions-builtin/Lora/network_ia3.py @@ -9,7 +9,7 @@ class ModuleTypeIa3(network.ModuleType): return None -class NetworkModuleIa3(network.NetworkModule): +class NetworkModuleIa3(network.NetworkModule): # pylint: disable=abstract-method def __init__(self, net: network.Network, weights: network.NetworkWeights): super().__init__(net, weights) self.w = weights.w["weight"] diff --git a/extensions-builtin/Lora/network_lokr.py b/extensions-builtin/Lora/network_lokr.py index cafdb968a..0bdce7154 100644 --- a/extensions-builtin/Lora/network_lokr.py +++ b/extensions-builtin/Lora/network_lokr.py @@ -19,7 +19,7 @@ def make_kron(orig_shape, w1, w2): return torch.kron(w1, w2).reshape(orig_shape) -class NetworkModuleLokr(network.NetworkModule): +class NetworkModuleLokr(network.NetworkModule): # pylint: disable=abstract-method def __init__(self, net: network.Network, weights: network.NetworkWeights): super().__init__(net, weights) self.w1 = weights.w.get("lokr_w1") diff --git a/extensions-builtin/Lora/network_norm.py b/extensions-builtin/Lora/network_norm.py index f327b9754..0980dacb1 100644 --- a/extensions-builtin/Lora/network_norm.py +++ b/extensions-builtin/Lora/network_norm.py @@ -8,7 +8,7 @@ class ModuleTypeNorm(network.ModuleType): return None -class NetworkModuleNorm(network.NetworkModule): +class NetworkModuleNorm(network.NetworkModule): # pylint: disable=abstract-method def __init__(self, net: network.Network, weights: network.NetworkWeights): super().__init__(net, weights) self.w_norm = weights.w.get("w_norm") diff --git a/extensions-builtin/Lora/network_oft.py b/extensions-builtin/Lora/network_oft.py index 6cadc36d0..802492ca2 100644 --- a/extensions-builtin/Lora/network_oft.py +++ b/extensions-builtin/Lora/network_oft.py @@ -13,7 +13,7 @@ class ModuleTypeOFT(network.ModuleType): # Supports both kohya-ss' implementation of COFT https://github.com/kohya-ss/sd-scripts/blob/main/networks/oft.py # and KohakuBlueleaf's implementation of OFT/COFT https://github.com/KohakuBlueleaf/LyCORIS/blob/dev/lycoris/modules/diag_oft.py -class NetworkModuleOFT(network.NetworkModule): +class NetworkModuleOFT(network.NetworkModule): # pylint: disable=abstract-method def __init__(self, net: network.Network, weights: network.NetworkWeights): super().__init__(net, weights) diff --git a/extensions-builtin/sdnext-modernui b/extensions-builtin/sdnext-modernui index 6cd3da6ab..bd9134513 160000 --- a/extensions-builtin/sdnext-modernui +++ b/extensions-builtin/sdnext-modernui @@ -1 +1 @@ -Subproject commit 6cd3da6abd7e59760cc57f3f7dde6d947655e425 +Subproject commit bd9134513371aee6e26ed196a71d3937188e52df diff --git a/html/screenshot-modernui.jpg b/html/screenshot-modernui.jpg new file mode 100644 index 000000000..dafadc28f Binary files /dev/null and b/html/screenshot-modernui.jpg differ diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 7183b11e9..6c1a83c6d 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -128,6 +128,9 @@ class ExtraNetworksPage: def refresh(self): pass + def patch(self, text: str, tabname: str): + return text.replace('~tabname', tabname) + def create_xyz_grid(self): xyz_grid = [x for x in scripts.scripts_data if x.script_class.__module__ == "xyz_grid.py"][0].module @@ -209,7 +212,7 @@ class ExtraNetworksPage: def create_page(self, tabname, skip = False): debug(f'EN create-page: {self.name}') if self.page_time > refresh_time and len(self.html) > 0: # cached page - return self.html + return self.patch(self.html, tabname) self_name_id = self.name.replace(" ", "_") if skip: return f"
Extra network page not ready
Click refresh to try again
" @@ -267,11 +270,11 @@ class ExtraNetworksPage: htmls.append(self.create_html(item, tabname)) self.html += ''.join(htmls) self.page_time = time.time() - self.html = f"
{subdirs_html}
{self.html}
" + self.html = f"
{subdirs_html}
{self.html}
" shared.log.debug(f"Extra networks: page='{self.name}' items={len(self.items)} subfolders={len(subdirs)} tab={tabname} folders={self.allowed_directories_for_previews()} list={self.list_time:.2f} thumb={self.preview_time:.2f} desc={self.desc_time:.2f} info={self.info_time:.2f} workers={shared.max_workers} sort={shared.opts.extra_networks_sort}") if len(self.missing_thumbs) > 0: threading.Thread(target=self.create_thumb).start() - return self.html + return self.patch(self.html, tabname) def list_items(self): raise NotImplementedError @@ -624,7 +627,7 @@ def create_ui(container, button_parent, tabname, skip_indexing = False): for page in get_pages(): page.create_page(ui.tabname, skip_indexing) with gr.Tab(page.title, id=page.title.lower().replace(" ", "_"), elem_classes="extra-networks-tab") as tab: - page_html = gr.HTML(page.html, elem_id=f'{tabname}{page.name}_extra_page', elem_classes="extra-networks-page") + page_html = gr.HTML(page.patch(page.html, tabname), elem_id=f'{tabname}{page.name}_extra_page', elem_classes="extra-networks-page") ui.pages.append(page_html) tab.select(ui_tab_change, _js="getENActivePage", inputs=[ui.button_details], outputs=[ui.button_scan, ui.button_save, ui.button_model]) if shared.cmd_opts.profile: