mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
Merge branch 'feature/add-prompt-translate'
This commit is contained in:
@@ -44,7 +44,6 @@ def worker():
|
|||||||
from modules.util import remove_empty_str, HWC3, resize_image, \
|
from modules.util import remove_empty_str, HWC3, resize_image, \
|
||||||
get_image_shape_ceil, set_image_shape_ceil, get_shape_ceil, resample_image
|
get_image_shape_ceil, set_image_shape_ceil, get_shape_ceil, resample_image
|
||||||
from modules.upscaler import perform_upscale
|
from modules.upscaler import perform_upscale
|
||||||
from modules.translator import translate2en
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async_gradio_app = shared.gradio_root
|
async_gradio_app = shared.gradio_root
|
||||||
@@ -206,6 +205,7 @@ def worker():
|
|||||||
steps = 8
|
steps = 8
|
||||||
|
|
||||||
if translate_prompts:
|
if translate_prompts:
|
||||||
|
from modules.translator import translate2en
|
||||||
prompt = translate2en(prompt, 'prompt')
|
prompt = translate2en(prompt, 'prompt')
|
||||||
negative_prompt = translate2en(negative_prompt, 'negative prompt')
|
negative_prompt = translate2en(negative_prompt, 'negative prompt')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user