diff --git a/fooocus_version.py b/fooocus_version.py index b9acb65a..18558de9 100644 --- a/fooocus_version.py +++ b/fooocus_version.py @@ -1 +1 @@ -version = '2.1.698' +version = '2.1.699' diff --git a/modules/patch.py b/modules/patch.py index 18a45baa..7b6a38cd 100644 --- a/modules/patch.py +++ b/modules/patch.py @@ -517,17 +517,19 @@ def build_loaded(module, loader_name): return +def disable_smart_memory(): + print(f'[Fooocus] Disabling smart memory') + fcbh.model_management.DISABLE_SMART_MEMORY = True + args_manager.args.disable_smart_memory = True + fcbh.cli_args.args.disable_smart_memory = True + return + + def patch_all(): - if not fcbh.model_management.DISABLE_SMART_MEMORY: - vram_inadequate = fcbh.model_management.total_vram < 20 * 1024 - is_old_gpu_arch = not fcbh.model_management.should_use_fp16() - if vram_inadequate or is_old_gpu_arch: - # https://github.com/lllyasviel/Fooocus/issues/602 - print(f'[Fooocus Smart Memory] Disabling smart memory, ' - f'vram_inadequate = {vram_inadequate}, is_old_gpu_arch = {is_old_gpu_arch}.') - fcbh.model_management.DISABLE_SMART_MEMORY = True - args_manager.args.disable_smart_memory = True - fcbh.cli_args.args.disable_smart_memory = True + # Many recent reports show that Comfyanonymous's method is still not robust enough and many 4090s are broken + # We will not use it until this method is really usable + # For example https://github.com/lllyasviel/Fooocus/issues/724 + disable_smart_memory() if not hasattr(fcbh.model_management, 'load_models_gpu_origin'): fcbh.model_management.load_models_gpu_origin = fcbh.model_management.load_models_gpu