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.
This commit is contained in:
Manuel Schmid 2023-11-26 11:23:02 +01:00
parent 29d1c3ee34
commit 8718e80dc2
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
1 changed files with 1 additions and 1 deletions

View File

@ -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')