diff --git a/.dockerignore b/.dockerignore index 0733e81..e1e4222 100644 --- a/.dockerignore +++ b/.dockerignore @@ -20,7 +20,6 @@ user_path_config-deprecated.txt build_chb.py experiment.py /modules/*.png -/repositories /venv /tmp /ui-config.json diff --git a/fooocusapi/parameters.py b/fooocusapi/parameters.py index c61bef6..0b6ef6c 100644 --- a/fooocusapi/parameters.py +++ b/fooocusapi/parameters.py @@ -35,7 +35,7 @@ default_base_model_name = "juggernautXL_v8Rundiffusion.safetensors" default_refiner_model_name = "None" default_refiner_switch = 0.5 -default_loras = [[True, "sd_xl_offset_example-lora_1.0.safetensors", 0.1]] +default_loras = [["sd_xl_offset_example-lora_1.0.safetensors", 0.1]] default_cfg_scale = 7.0 default_prompt_negative = "" default_aspect_ratio = "1152*896" diff --git a/fooocusapi/utils/lora_manager.py b/fooocusapi/utils/lora_manager.py index f6e72b1..fcff29a 100644 --- a/fooocusapi/utils/lora_manager.py +++ b/fooocusapi/utils/lora_manager.py @@ -19,7 +19,10 @@ class LoraManager: Manager loras from url """ def __init__(self): - self.cache_dir = "/models/loras/" + self.cache_dir = os.path.join( + os.path.dirname(os.path.realpath(__file__)), + '../../', + 'repositories/Fooocus/models/loras') def _download_lora(self, url): """ diff --git a/fooocusapi/worker.py b/fooocusapi/worker.py index 3d1034f..f0f4404 100644 --- a/fooocusapi/worker.py +++ b/fooocusapi/worker.py @@ -464,7 +464,8 @@ def yield_result(_, imgs, tasks, extension='png'): pipeline.refresh_everything( refiner_model_name=refiner_model_name, base_model_name=base_model_name, - loras=loras, base_model_additional_loras=base_model_additional_loras, + loras=loras, + base_model_additional_loras=base_model_additional_loras, use_synthetic_refiner=use_synthetic_refiner) progressbar(async_task, 3, 'Processing prompts ...') diff --git a/predict.py b/predict.py index 3a2ec9c..5ac6624 100644 --- a/predict.py +++ b/predict.py @@ -60,7 +60,7 @@ def predict( description="Fooocus styles applied for image generation, separated by comma"), performance_selection: str = Input( default='Speed', - choices=['Speed', 'Quality', 'Extreme Speed'], + choices=['Speed', 'Quality', 'Extreme Speed', 'Lightning'], description="Performance selection"), aspect_ratios_selection: str = Input( default='1152*896',