From d3d63d5bf61b77d2a9cc95097f451329dee5911c Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Mon, 13 Nov 2023 04:37:25 -0800 Subject: [PATCH] 2.1.802 Default inpaint engine changed to v2.6. You can still use inpaint engine v1 in dev tools. Fix some VRAM problems. --- args_manager.py | 6 ++---- fooocus_version.py | 2 +- models/inpaint/put_inpaint_here | 0 modules/config.py | 2 +- modules/flags.py | 3 +++ readme.md | 2 +- update_log.md | 5 +++++ webui.py | 4 +++- 8 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 models/inpaint/put_inpaint_here diff --git a/args_manager.py b/args_manager.py index 1388ac737..3c34d3362 100644 --- a/args_manager.py +++ b/args_manager.py @@ -23,9 +23,7 @@ fcbh_cli.args = fcbh_cli.parser.parse_args() -# (beta, enabled by default. ) -# (Probably disable by default because of issues like https://github.com/lllyasviel/Fooocus/issues/724) -if fcbh_cli.args.enable_smart_memory: - fcbh_cli.args.disable_smart_memory = False +# (Disable by default because of issues like https://github.com/lllyasviel/Fooocus/issues/724) +fcbh_cli.args.disable_smart_memory = not fcbh_cli.args.enable_smart_memory args = fcbh_cli.args diff --git a/fooocus_version.py b/fooocus_version.py index a00bd3598..68d34eceb 100644 --- a/fooocus_version.py +++ b/fooocus_version.py @@ -1 +1 @@ -version = '2.1.801' +version = '2.1.802' diff --git a/models/inpaint/put_inpaint_here b/models/inpaint/put_inpaint_here new file mode 100644 index 000000000..e69de29bb diff --git a/modules/config.py b/modules/config.py index ec0276e17..61395f9ee 100644 --- a/modules/config.py +++ b/modules/config.py @@ -280,7 +280,7 @@ def update_all_model_names(): def downloading_inpaint_models(v): - assert v in ['v1', 'v2.5', 'v2.6'] + assert v in modules.flags.inpaint_engine_versions load_file_from_url( url='https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/fooocus_inpaint_head.pth', diff --git a/modules/flags.py b/modules/flags.py index 3f22e4695..48d5d08b3 100644 --- a/modules/flags.py +++ b/modules/flags.py @@ -31,3 +31,6 @@ default_parameters = { cn_ip: (0.5, 0.6), cn_ip_face: (0.9, 0.75), cn_canny: (0.5, 1.0), cn_cpds: (0.5, 1.0) } # stop, weight + +inpaint_engine_versions = ['v1', 'v2.5', 'v2.6'] +default_inpaint_engine_version = 'v2.6' diff --git a/readme.md b/readme.md index 3ceb2dc88..f80e7c67b 100644 --- a/readme.md +++ b/readme.md @@ -77,7 +77,7 @@ After you download the file, please uncompress it, and then run the "run.bat". In the first time you launch the software, it will automatically download models: 1. It will download [default models](#models) to the folder "Fooocus\models\checkpoints" given different presets. You can download them in advance if you do not want automatic download. -2. Note that if you use inpaint, at the first time you inpaint an image, it will download [Fooocus's own inpaint control model from here](https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/inpaint.fooocus.patch) as the file "Fooocus\models\inpaint\inpaint.fooocus.patch" (the size of this file is 1.28GB). +2. Note that if you use inpaint, at the first time you inpaint an image, it will download [Fooocus's own inpaint control model from here](https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/inpaint_v26.fooocus.patch) as the file "Fooocus\models\inpaint\inpaint_v26.fooocus.patch" (the size of this file is 1.28GB). After Fooocus 2.1.60, you will also have `run_anime.bat` and `run_realistic.bat`. They are different model presets (and requires different models, but thet will be automatically downloaded). [Check here for more details](https://github.com/lllyasviel/Fooocus/discussions/679). diff --git a/update_log.md b/update_log.md index 860ad9d8f..7bdd2d813 100644 --- a/update_log.md +++ b/update_log.md @@ -1,3 +1,8 @@ +# 2.1.802 + +* Default inpaint engine changed to v2.6. You can still use inpaint engine v1 in dev tools. +* Fix some VRAM problems. + # 2.1.799 * Added 'Extreme Speed' performance mode (based on LCM). The previous complicated settings are not needed now. diff --git a/webui.py b/webui.py index cb07b7765..3d2613035 100644 --- a/webui.py +++ b/webui.py @@ -304,7 +304,9 @@ def refresh_seed(r, seed_string): minimum=-1, maximum=1.0, step=0.001, value=-1, info='Set as negative number to disable. For developer debugging.') - inpaint_engine = gr.Dropdown(label='Inpaint Engine', value='v1', choices=['v1', 'v2.5', 'v2.6'], + inpaint_engine = gr.Dropdown(label='Inpaint Engine', + value=flags.default_inpaint_engine_version, + choices=flags.inpaint_engine_versions, info='Version of Fooocus inpaint model') with gr.Tab(label='Control Debug'):