mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
082a5262b0 | ||
|
|
14895ebb13 | ||
|
|
b0d16a3aa7 | ||
|
|
fd74b57f56 | ||
|
|
8bd9ea1dbf | ||
|
|
ee12d114c1 |
+1
-1
@@ -1 +1 @@
|
|||||||
version = '2.5.3'
|
version = '2.5.4'
|
||||||
@@ -21,6 +21,7 @@ import fooocus_version
|
|||||||
from build_launcher import build_launcher
|
from build_launcher import build_launcher
|
||||||
from modules.launch_util import is_installed, run, python, run_pip, requirements_met, delete_folder_content
|
from modules.launch_util import is_installed, run, python, run_pip, requirements_met, delete_folder_content
|
||||||
from modules.model_loader import load_file_from_url
|
from modules.model_loader import load_file_from_url
|
||||||
|
from modules.util import get_file_from_folder_list
|
||||||
|
|
||||||
REINSTALL_ALL = False
|
REINSTALL_ALL = False
|
||||||
TRY_INSTALL_XFORMERS = False
|
TRY_INSTALL_XFORMERS = False
|
||||||
@@ -80,12 +81,13 @@ if args.gpu_device_id is not None:
|
|||||||
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.gpu_device_id)
|
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.gpu_device_id)
|
||||||
print("Set device to:", args.gpu_device_id)
|
print("Set device to:", args.gpu_device_id)
|
||||||
|
|
||||||
if args.hf_mirror is not None :
|
if args.hf_mirror is not None:
|
||||||
os.environ['HF_MIRROR'] = str(args.hf_mirror)
|
os.environ['HF_MIRROR'] = str(args.hf_mirror)
|
||||||
print("Set hf_mirror to:", args.hf_mirror)
|
print("Set hf_mirror to:", args.hf_mirror)
|
||||||
|
|
||||||
from modules import config
|
from modules import config
|
||||||
from modules.hash_cache import init_cache
|
from modules.hash_cache import init_cache
|
||||||
|
|
||||||
os.environ["U2NET_HOME"] = config.path_inpaint
|
os.environ["U2NET_HOME"] = config.path_inpaint
|
||||||
|
|
||||||
os.environ['GRADIO_TEMP_DIR'] = config.temp_path
|
os.environ['GRADIO_TEMP_DIR'] = config.temp_path
|
||||||
@@ -114,9 +116,9 @@ def download_models(default_model, previous_default_models, checkpoint_downloads
|
|||||||
return default_model, checkpoint_downloads
|
return default_model, checkpoint_downloads
|
||||||
|
|
||||||
if not args.always_download_new_model:
|
if not args.always_download_new_model:
|
||||||
if not os.path.exists(os.path.join(config.paths_checkpoints[0], default_model)):
|
if not os.path.isfile(get_file_from_folder_list(default_model, config.paths_checkpoints)):
|
||||||
for alternative_model_name in previous_default_models:
|
for alternative_model_name in previous_default_models:
|
||||||
if os.path.exists(os.path.join(config.paths_checkpoints[0], alternative_model_name)):
|
if os.path.isfile(get_file_from_folder_list(alternative_model_name, config.paths_checkpoints)):
|
||||||
print(f'You do not have [{default_model}] but you have [{alternative_model_name}].')
|
print(f'You do not have [{default_model}] but you have [{alternative_model_name}].')
|
||||||
print(f'Fooocus will use [{alternative_model_name}] to avoid downloading new models, '
|
print(f'Fooocus will use [{alternative_model_name}] to avoid downloading new models, '
|
||||||
f'but you are not using the latest models.')
|
f'but you are not using the latest models.')
|
||||||
@@ -126,11 +128,13 @@ def download_models(default_model, previous_default_models, checkpoint_downloads
|
|||||||
break
|
break
|
||||||
|
|
||||||
for file_name, url in checkpoint_downloads.items():
|
for file_name, url in checkpoint_downloads.items():
|
||||||
load_file_from_url(url=url, model_dir=config.paths_checkpoints[0], file_name=file_name)
|
model_dir = os.path.dirname(get_file_from_folder_list(file_name, config.paths_checkpoints))
|
||||||
|
load_file_from_url(url=url, model_dir=model_dir, file_name=file_name)
|
||||||
for file_name, url in embeddings_downloads.items():
|
for file_name, url in embeddings_downloads.items():
|
||||||
load_file_from_url(url=url, model_dir=config.path_embeddings, file_name=file_name)
|
load_file_from_url(url=url, model_dir=config.path_embeddings, file_name=file_name)
|
||||||
for file_name, url in lora_downloads.items():
|
for file_name, url in lora_downloads.items():
|
||||||
load_file_from_url(url=url, model_dir=config.paths_loras[0], file_name=file_name)
|
model_dir = os.path.dirname(get_file_from_folder_list(file_name, config.paths_loras))
|
||||||
|
load_file_from_url(url=url, model_dir=model_dir, file_name=file_name)
|
||||||
for file_name, url in vae_downloads.items():
|
for file_name, url in vae_downloads.items():
|
||||||
load_file_from_url(url=url, model_dir=config.path_vae, file_name=file_name)
|
load_file_from_url(url=url, model_dir=config.path_vae, file_name=file_name)
|
||||||
|
|
||||||
|
|||||||
@@ -1223,6 +1223,8 @@ def worker():
|
|||||||
height, width, _ = async_task.enhance_input_image.shape
|
height, width, _ = async_task.enhance_input_image.shape
|
||||||
# input image already provided, processing is skipped
|
# input image already provided, processing is skipped
|
||||||
steps = 0
|
steps = 0
|
||||||
|
yield_result(async_task, async_task.enhance_input_image, current_progress, async_task.black_out_nsfw, False,
|
||||||
|
async_task.disable_intermediate_results)
|
||||||
|
|
||||||
all_steps = steps * async_task.image_number
|
all_steps = steps * async_task.image_number
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -520,10 +520,14 @@ for image_count in range(default_controlnet_image_count):
|
|||||||
image_count += 1
|
image_count += 1
|
||||||
default_ip_images[image_count] = get_config_item_or_set_default(
|
default_ip_images[image_count] = get_config_item_or_set_default(
|
||||||
key=f'default_ip_image_{image_count}',
|
key=f'default_ip_image_{image_count}',
|
||||||
default_value=None,
|
default_value='None',
|
||||||
validator=lambda x: x is None or isinstance(x, str) and os.path.exists(x),
|
validator=lambda x: x == 'None' or isinstance(x, str) and os.path.exists(x),
|
||||||
expected_type=str
|
expected_type=str
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if default_ip_images[image_count] == 'None':
|
||||||
|
default_ip_images[image_count] = None
|
||||||
|
|
||||||
default_ip_types[image_count] = get_config_item_or_set_default(
|
default_ip_types[image_count] = get_config_item_or_set_default(
|
||||||
key=f'default_ip_type_{image_count}',
|
key=f'default_ip_type_{image_count}',
|
||||||
default_value=modules.flags.default_ip,
|
default_value=modules.flags.default_ip,
|
||||||
@@ -698,7 +702,7 @@ default_inpaint_mask_cloth_category = get_config_item_or_set_default(
|
|||||||
default_inpaint_mask_sam_model = get_config_item_or_set_default(
|
default_inpaint_mask_sam_model = get_config_item_or_set_default(
|
||||||
key='default_inpaint_mask_sam_model',
|
key='default_inpaint_mask_sam_model',
|
||||||
default_value='vit_b',
|
default_value='vit_b',
|
||||||
validator=lambda x: x in [y[1] for y in modules.flags.inpaint_mask_sam_model if y[1] == x],
|
validator=lambda x: x in modules.flags.inpaint_mask_sam_model,
|
||||||
expected_type=str
|
expected_type=str
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
# [2.5.4](https://github.com/lllyasviel/Fooocus/releases/tag/v2.5.4)
|
||||||
|
|
||||||
|
* Fix validation for default_ip_image_* and default_inpaint_mask_sam_model
|
||||||
|
* Fix enhance mask debugging in combination with image sorting
|
||||||
|
* Fix loading of checkpoints and LoRAs when using multiple directories in config and then switching presets
|
||||||
|
|
||||||
# [2.5.3](https://github.com/lllyasviel/Fooocus/releases/tag/v2.5.3)
|
# [2.5.3](https://github.com/lllyasviel/Fooocus/releases/tag/v2.5.3)
|
||||||
|
|
||||||
* Only load weights from non-safetensors files, preventing harmful code injection
|
* Only load weights from non-safetensors files, preventing harmful code injection
|
||||||
|
|||||||
Reference in New Issue
Block a user