Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add prompt translation #1039

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
mashb1t committed Nov 26, 2023
commit 8718e80dc2d7fd0962da1e949145f2b77bee8a96
2 changes: 1 addition & 1 deletion modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -198,6 +197,7 @@ def handler(async_task):
steps = 8

if translate_prompts:
from modules.translator import translate2en
prompt = translate2en(prompt, 'prompt')
negative_prompt = translate2en(negative_prompt, 'negative prompt')

Expand Down