Skip to content

Commit

Permalink
fix progressbar call for nsfw output
Browse files Browse the repository at this point in the history
  • Loading branch information
mashb1t committed Nov 18, 2023
1 parent 6893c8d commit f26d2e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ def progressbar(async_task, number, text):
print(f'[Fooocus] {text}')
async_task.yields.append(['preview', (number, text, None)])

def yield_result(async_task, imgs, do_not_show_finished_images=False):
def yield_result(async_task, imgs, do_not_show_finished_images=False, progressbar_index=13):
if not isinstance(imgs, list):
imgs = [imgs]

if modules.config.default_black_out_nsfw:
progressbar(progressbar_index, 'Checking for NSFW content ...')
progressbar(async_task, progressbar_index, 'Checking for NSFW content ...')
imgs = censor_batch(imgs)

async_task.results = async_task.results + imgs
Expand Down

0 comments on commit f26d2e7

Please sign in to comment.