Skip to content

Commit

Permalink
Merge pull request #6 from ChrisColeTech/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ChrisColeTech committed Aug 21, 2024
2 parents 48dd47d + 4b90d70 commit 07ab8a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ def callback(step, x0, x, total_steps, y):
progressbar(async_task, current_progress,
f'Preparing task {current_task_id + 1}/{async_task.image_number} ...')
current_task_number = current_task_id + 1
setup(async_task, current_task_number)
setup(async_task)
patch_samplers(async_task)
execution_start_time = time.perf_counter()
try:
Expand Down Expand Up @@ -1841,10 +1841,9 @@ def callback(step, x0, x, total_steps, y):
stop_processing(async_task, processing_start_time)
return

def setup(async_task: AsyncTask, current_task_number):
def setup(async_task: AsyncTask):
base_model_additional_loras = []
current_progress = 0
tasks = []
use_synthetic_refiner = False
if fooocus_expansion in async_task.style_selections:
use_expansion = True
Expand All @@ -1865,11 +1864,10 @@ def setup(async_task: AsyncTask, current_task_number):
clip_vision_path, ip_negative_path, ip_adapter_face_path)
inpaint_worker.current_task = None

loras = async_task.loras
tasks, use_expansion, loras, current_progress = process_prompt(async_task, async_task.prompt, async_task.negative_prompt,
base_model_additional_loras, 1,
async_task.disable_seed_increment, use_expansion, use_style,
use_synthetic_refiner, current_progress, advance_progress=True)
process_prompt(async_task, async_task.prompt, async_task.negative_prompt,
base_model_additional_loras, 1,
async_task.disable_seed_increment, use_expansion, use_style,
use_synthetic_refiner, current_progress, advance_progress=True)
apply_patch_settings(async_task)
return

Expand Down
2 changes: 1 addition & 1 deletion modules/bulk_enhance_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def on_input_change(input_path, file_explorer):
# Verify with normalised version of path
input_path = os.path.normpath(os.path.realpath(input_path))

if os.path.isdir(input_path):
if os.path.isdir(os.path.realpath(input_path)):
# Return an empty list if input_path is a directory
return None, gr.update(visible=True), gr.update(value=True)
else:
Expand Down

0 comments on commit 07ab8a4

Please sign in to comment.