diff --git a/CHANGELOG.md b/CHANGELOG.md index a82e6c6dc..434ee8036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log for SD.Next -## Update for 2023-01-08 +## Update for 2023-01-09 Following-up on a major release, here is a lot more functionality in new Control module and FaceID & IPAdapter modules Plus welcome additions to UI accessibility and flexibility of deployment @@ -41,6 +41,7 @@ And it also includes fixes for all reported issues so far - fix video color mode - fix correct image mode - fix batch/folder/video modes + - fix processor switching within same unit - fix pipeline switching between different modes - [FaceID](https://huggingface.co/h94/IP-Adapter-FaceID) - full implementation for *SD15* and *SD-XL*, to use simply select from *Scripts* diff --git a/README.md b/README.md index f92c753b6..df2a01493 100644 --- a/README.md +++ b/README.md @@ -184,31 +184,6 @@ SD.Next comes with several extensions pre-installed: - 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. -### **Goals** - -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. - -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".* - -General goals: - -- Multi-model - - Enable usage of as many as possible txt2img and img2img generative models -- Cross-platform - - Create uniform experience while automatically managing any platform specific differences -- Performance - - Enable best possible performance on all platforms -- Ease-of-Use - - Automatically handle all requirements, dependencies, flags regardless of platform - - Integrate all best options for uniform out-of-the-box experience without the need to tweak anything manually -- Look-and-Feel - - Create modern, intuitive and clean UI -- Up-to-Date - - Keep code up to date with latest advanced in text-to-image generation - ## Credits - Main credit goes to [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) diff --git a/cli/sdapi.py b/cli/sdapi.py index cf66d191e..a91910b1b 100755 --- a/cli/sdapi.py +++ b/cli/sdapi.py @@ -20,7 +20,7 @@ from util import Map, log from rich import print # pylint: disable=redefined-builtin -sd_url = os.environ.get('SDAPI_URL', "http://127.0.0.1:7860") # automatic1111 api url root +sd_url = os.environ.get('SDAPI_URL', "http://127.0.0.1:7860") # api url root sd_username = os.environ.get('SDAPI_USR', None) sd_password = os.environ.get('SDAPI_PWD', None) diff --git a/modules/control/processors.py b/modules/control/processors.py index a17ffe0dd..bd11105a7 100644 --- a/modules/control/processors.py +++ b/modules/control/processors.py @@ -114,19 +114,13 @@ def update_settings(*settings): class Processor(): - def __init__(self, processor_id: str = None, resize = True, load_config = None): + def __init__(self, processor_id: str = None, resize = True): self.model = None + self.processor_id = None + self.override = None self.resize = resize - self.processor_id = processor_id - self.override = None # override input image - self.load_config = { 'cache_dir': cache_dir } - from_config = config.get(processor_id, {}).get('load_config', None) - if load_config is not None: - for k, v in load_config.items(): - self.load_config[k] = v - if from_config is not None: - for k, v in from_config.items(): - self.load_config[k] = v + self.reset() + self.config(processor_id) if processor_id is not None: self.load() @@ -136,6 +130,20 @@ class Processor(): self.model = None self.processor_id = None self.override = None + self.load_config = { 'cache_dir': cache_dir } + + def config(self, processor_id = None): + if processor_id is not None: + self.processor_id = processor_id + from_config = config.get(self.processor_id, {}).get('load_config', None) + """ + if load_config is not None: + for k, v in load_config.items(): + self.load_config[k] = v + """ + if from_config is not None: + for k, v in from_config.items(): + self.load_config[k] = v def load(self, processor_id: str = None) -> str: try: @@ -144,10 +152,10 @@ class Processor(): if processor_id is None or processor_id == 'None': self.reset() return '' - from_config = config.get(processor_id, {}).get('load_config', None) - if from_config is not None: - for k, v in from_config.items(): - self.load_config[k] = v + if self.processor_id != processor_id: + self.reset() + self.config(processor_id) + print('HERE', self.processor_id, processor_id, self.load_config) cls = config[processor_id]['class'] log.debug(f'Control Processor loading: id="{processor_id}" class={cls.__name__}') debug(f'Control Processor config={self.load_config}')