From 9e08b4c7d34c42c642d8cf7e657b9d15e0f1fcf0 Mon Sep 17 00:00:00 2001 From: Alexey Borsky Date: Tue, 16 May 2023 10:52:08 +0300 Subject: [PATCH] reference_only exception --- readme.md | 5 +++++ scripts/base_ui.py | 2 +- scripts/core/utils.py | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index b1a5970..991ac51 100644 --- a/readme.md +++ b/readme.md @@ -60,6 +60,7 @@ To install the extension go to 'Extensions' tab in [Automatic1111 web-ui](https: * If you see error like this ```IndexError: list index out of range``` try to restart webui, it should fix it. * The extension might work incorrectly if 'Apply color correction to img2img results to match original colors.' option is enabled. Make sure to disable it in 'Settings' tab -> 'Stable Diffusion' section. * If you have an error like 'Need to enable queue to use generators.', please update webui to the latest version. Beware that only [Automatic1111 web-ui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) is fully supported. +* The extension is not compatible with Macs. If you have a case that extension is working for you or do you know how to make it compatible, please open a new discussion. ## Last version changes: v0.9 * Fixed issues #69, #76, #91, #92. @@ -73,3 +74,7 @@ To install the extension go to 'Extensions' tab in [Automatic1111 web-ui](https: * Added ControlNet to txt2vid mode as well as fixing #86 issue, thanks to [@mariaWitch](https://github.com/mariaWitch) * Fixed a major issue when ConrtolNet used wrong input images. Because of this vid2vid results were way worse than they should be. * Text to video mode now supports video as a guidance for ControlNet. It allows to create much stronger video stylizations. + + diff --git a/scripts/base_ui.py b/scripts/base_ui.py index 343a98b..8dd8b91 100644 --- a/scripts/base_ui.py +++ b/scripts/base_ui.py @@ -171,7 +171,7 @@ def export_settings(*args): raise Exception(msg) # convert CN params into a readable dict - cn_remove_list = ['low_vram', 'is_ui', 'input_mode', 'batch_images', 'output_dir', 'loopback'] + cn_remove_list = ['low_vram', 'is_ui', 'input_mode', 'batch_images', 'output_dir', 'loopback', 'image'] args_dict['ControlNets'] = [] for script_input in args_dict['script_inputs']: diff --git a/scripts/core/utils.py b/scripts/core/utils.py index bdcb105..c237c26 100644 --- a/scripts/core/utils.py +++ b/scripts/core/utils.py @@ -121,8 +121,9 @@ def get_mode_args(mode, args_dict): def set_CNs_input_image(args_dict, image): for script_input in args_dict['script_inputs']: if type(script_input).__name__ == 'UiControlNetUnit': - script_input.batch_images = [np.array(image)] - script_input.image = np.array(image) + if script_input.module not in ["reference_only", "reference_adain", "reference_adain+attn"]: + script_input.image = np.array(image) + script_input.batch_images = [np.array(image)] import time import datetime