Fooocus icon indicating copy to clipboard operation
Fooocus copied to clipboard

Multi-language input support like DALL·E 3

Open tiancool opened this issue 1 year ago • 2 comments

DALL·E 3 has a very good experience in supporting multiple languages. Does FS have any plans to make the prompt words multilingual? I know that some branches are currently working on related tasks, but they have not reached an excellent level. I hope the official team can plan this task.

tiancool avatar Nov 18 '23 17:11 tiancool

I think that's powered by GPT4, not Dall E.

thiner avatar Nov 19 '23 10:11 thiner

translators

# update webui.py
import translators as ts
from functools import lru_cache

@lru_cache(maxsize=16, typed=False)
def translator2en(text):
    try:
        return ts.translate_text(text,to_language='en')
    except Exception as e:
        return text

def generate_clicked(*args):
    args = (translator2en(args[0]),*args[1:])

favouriter avatar Nov 24 '23 07:11 favouriter