diff --git a/entry_with_update.py b/entry_with_update.py index 4b66ac2d2..caa74ee87 100644 --- a/entry_with_update.py +++ b/entry_with_update.py @@ -43,4 +43,4 @@ print(str(e)) print('Update succeeded.') -from launch import * +from launch import * \ No newline at end of file diff --git a/launch.py b/launch.py index 0cfde8fbd..2130ea8ae 100644 --- a/launch.py +++ b/launch.py @@ -125,4 +125,4 @@ def download_models(default_model, previous_default_models, checkpoint_downloads config.default_base_model_name, config.previous_default_models, config.checkpoint_downloads, config.embeddings_downloads, config.lora_downloads) -from webui import * +from webui import * \ No newline at end of file diff --git a/modules/async_worker.py b/modules/async_worker.py index 70d2ab2c5..c25bbb1dc 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -156,8 +156,8 @@ def handler(async_task): loras = [[str(args.pop()), float(args.pop())] for _ in range(lora_count)] input_image_checkbox = args.pop() current_tab = args.pop() - uov_method = args.pop() - uov_input_image = args.pop() + # uov_method = args.pop() + # uov_input_image = args.pop() outpaint_selections = args.pop() inpaint_input_image = args.pop() inpaint_additional_prompt = args.pop() @@ -215,7 +215,7 @@ def handler(async_task): outpaint_selections = [o.lower() for o in outpaint_selections] base_model_additional_loras = [] raw_style_selections = copy.deepcopy(style_selections) - uov_method = uov_method.lower() + # uov_method = uov_method.lower() if fooocus_expansion in style_selections: use_expansion = True @@ -470,7 +470,7 @@ def handler(async_task): if use_expansion: for i, t in enumerate(tasks): - progressbar(async_task, 5, f'Preparing Fooocus text #{i + 1} ...') + progressbar(async_task, 5, f'Preparing fashionCORE text #{i + 1} ...') expansion = pipeline.final_expansion(t['task_prompt'], t['task_seed']) print(f'[Prompt Expansion] {expansion}') t['expansion'] = expansion diff --git a/modules/config.py b/modules/config.py index 4e83568cd..f8a1b199b 100644 --- a/modules/config.py +++ b/modules/config.py @@ -96,7 +96,7 @@ def replace_config(old_key, new_key): def list_presets(): preset_folder = 'presets' - presets = ['initial'] + presets = ['realistic'] if not os.path.exists(preset_folder): print('No presets found.') return presets @@ -326,7 +326,7 @@ def get_config_item_or_set_default(key, default_value, validator, disable_empty_ ) default_advanced_checkbox = get_config_item_or_set_default( key='default_advanced_checkbox', - default_value=False, + default_value=True, validator=lambda x: isinstance(x, bool) ) default_max_image_number = get_config_item_or_set_default( diff --git a/webui.py b/webui.py index 97f102c04..1e9e9be58 100644 --- a/webui.py +++ b/webui.py @@ -13,7 +13,7 @@ import modules.gradio_hijack as grh import modules.style_sorter as style_sorter import modules.meta_parser -from modules.rembg import rembg_run +# from modules.rembg import rembg_run import args_manager import copy import launch @@ -24,15 +24,15 @@ from modules.auth import auth_enabled, check_auth from modules.util import is_json -PHOTOPEA_MAIN_URL = "https://www.photopea.com/" -PHOTOPEA_IFRAME_ID = "webui-photopea-iframe" -PHOTOPEA_IFRAME_HEIGHT = 684 -PHOTOPEA_IFRAME_WIDTH = "100%" -PHOTOPEA_IFRAME_LOADED_EVENT = "onPhotopeaLoaded" +# PHOTOPEA_MAIN_URL = "https://www.photopea.com/" +# PHOTOPEA_IFRAME_ID = "webui-photopea-iframe" +# PHOTOPEA_IFRAME_HEIGHT = 684 +# PHOTOPEA_IFRAME_WIDTH = "100%" +# PHOTOPEA_IFRAME_LOADED_EVENT = "onPhotopeaLoaded" -def get_photopea_url_params(): - return "#%7B%22resources%22:%5B%22data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAAQMAAADOtka5AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRF////p8QbyAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfBuCAAAB0niJ8AAAAABJRU5ErkJggg==%22%5D%7D" +# def get_photopea_url_params(): +# return "#%7B%22resources%22:%5B%22data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAAQMAAADOtka5AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRF////p8QbyAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfBuCAAAB0niJ8AAAAABJRU5ErkJggg==%22%5D%7D" def get_task(*args): @@ -100,7 +100,7 @@ def generate_clicked(task): reload_javascript() -title = f'DeFooocus {fooocus_version.version}' +title = f'fashionCORE {fooocus_version.version}' if isinstance(args_manager.args.preset, str): title += ' ' + args_manager.args.preset @@ -114,7 +114,7 @@ def generate_clicked(task): currentTask = gr.State(worker.AsyncTask(args=[])) with gr.Row(): with gr.Column(scale=2): - with gr.Tab("Generation"): + with gr.Tab("fashionCORE"): with gr.Row(): progress_window = grh.Image(label='Preview', show_label=True, visible=False, height=768, elem_classes=['main_view']) @@ -125,24 +125,24 @@ def generate_clicked(task): gallery = gr.Gallery(label='Gallery', show_label=False, object_fit='contain', visible=True, height=768, elem_classes=['resizable_area', 'main_view', 'final_gallery', 'image_gallery'], elem_id='final_gallery') - with gr.Tab("Photopea"): - with gr.Row(): - photopea = gr.HTML( - f"""