diff --git a/modules/async_worker.py b/modules/async_worker.py index bcd69cb2..2e7075e9 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -44,7 +44,6 @@ def worker(): from modules.util import remove_empty_str, HWC3, resize_image, \ get_image_shape_ceil, set_image_shape_ceil, get_shape_ceil, resample_image from modules.upscaler import perform_upscale - from modules.translator import translate2en try: async_gradio_app = shared.gradio_root @@ -206,6 +205,7 @@ def worker(): steps = 8 if translate_prompts: + from modules.translator import translate2en prompt = translate2en(prompt, 'prompt') negative_prompt = translate2en(negative_prompt, 'negative prompt')