This script is made to be used with the AUTOMATIC1111 webui.
- Drop the
realtime_translate.py
intostable-diffusion-webui/scripts
folder. - Drop the
realtime_translate.js
intostable-diffusion-webui/javascript
folder. - Restart the sd-webui, the translating panel will show at the bottom.
If you're using a Google Colab, you can add this in a code block before the one that starts the webui :
!wget https://raw.githubusercontent.com/donlinglok/realtime-prompt-translate-for-sd-webui/main/realtime_translate.py -O /content/stable-diffusion-webui/scripts/realtime_translate.py
!wget https://raw.githubusercontent.com/donlinglok/realtime-prompt-translate-for-sd-webui/main/realtime_translate.js -O /content/stable-diffusion-webui/javascript/realtime_translate.js
- Click the
Translate
button and wait for the loading - After loading, input your prompt, and the translated text will show at the top of the sd-webui.
- Click the
Reversed Translate
button and wait for the loading. - After loading finish, input your prompt on the top of the sd-webui, your prompt will reverse translate to the English prompt box.
(651KB GIFs)
(823KB GIFs)
AUTOMATIC1111/stable-diffusion-webui#3134
https://stackoverflow.com/questions/17654458/how-to-make-an-reset-button-for-google-translate
https://github.com/Extraltodeus/advanced-loopback-for-sd-webui/blob/main/README.md