From 8718e80dc2d7fd0962da1e949145f2b77bee8a96 Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Sun, 26 Nov 2023 11:23:02 +0100 Subject: [PATCH] move import as it checks for users ip and geolocation Only metadata of users who specifically activated the prompt translate checkbox should be requested. This also prevented users with adblockers on DNS level from being able to generate images, now fixed. --- modules/async_worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/async_worker.py b/modules/async_worker.py index ce58584b..f78d04e1 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -41,7 +41,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 @@ -198,6 +197,7 @@ def worker(): steps = 8 if translate_prompts: + from modules.translator import translate2en prompt = translate2en(prompt, 'prompt') negative_prompt = translate2en(negative_prompt, 'negative prompt')