Skip to content

SD_api_pictures: using the loaded model to translate the prompt in english. #1344

@cmhamiche

Description

@cmhamiche

Getting SD_api_pictures to do a translation from user's language to a prompt in english using the currently loaded model before the call to Stable Diffusion, so everything's running locally.

I'm using Open Assistant llama's model (oasst-llama13b-4bit-128g) and it's very capable at languages like french or german and pretty decent at translations.

I'd love to be able to use the Stable Diffusion API pictures for TextGen extension but unfortunately if I'm having a conversation in french it will send a prompt to Stable Diffusion... in french. Results are off to say the least.

An option for SD_api_pictures to translate the prompt in the background before calling Stable Diffusion would make everything simpler and would also make Stable Diffusion multilingual, sort of.

Here's an other extensions I'm aware of:

For Stable-Diffusion-webui:

Stable-Diffusion-Webui-Prompt-Translator:
It's either using an online service (or an AI translation engine that wou'd have to setup called MarianM which apparently isn't that good anyway). Clicking the "Translate" button in stable diffusion's interface is required, not ideal.
https://github.com/butaixianran/Stable-Diffusion-Webui-Prompt-Translator

For text-generation-webui:
google_translate extension: It's also using an online service.
https://github.com/oobabooga/text-generation-webui/blob/main/extensions/google_translate/script.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions