Difference between revisions of "Sugoi"

From Era Wiki
Jump to: navigation, search
(Whatis)
(added outdated guide warning)
 
(25 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
This guide is OLD. It should still work but needs revamped for modern versions of Sugoi.
 +
 
== Whatis ==
 
== Whatis ==
WIP
+
Sugoi is a translation tool made by leminhyen2 on github. It reads from your clipboard and automatically translates through your choice of DeepL, Papago, or his homebrewed AI based translation model. The repo for the program is [https://github.com/leminhyen2/Sugoi-Japanese-Translator here] but it's outdated. You can get the newest versions from the [https://sugoitoolkit.com/ website], [https://www.patreon.com/mingshiba the developer's patreon], [https://discord.gg/XFbWSjMHJh developer's discord] or [https://archive.org/search?query=sugoi+toolkit Archive.org] keep in mind the model required for offline translation is included in the download.
 
 
 
 
 
 
[https://www.youtube.com/watch?v=r8xFzVbmo7k Demo video by developer], has up-to-date download links and a discord link in the description. Check here or in the aforementioned server for updates, this page might not be updated to mention them in any sort of timely fashion.
 
 
 
 
== Installing ==  
 
== Installing ==  
 
Sugoi is built for Windows 10. For Windows 7 users: You need [https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 Visual C++ 10, 13 and 15~22 x86 & x64 versions.] This program does not work on x86 systems.
 
Sugoi is built for Windows 10. For Windows 7 users: You need [https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 Visual C++ 10, 13 and 15~22 x86 & x64 versions.] This program does not work on x86 systems.
=== Online ===
 
Download [https://drive.google.com/file/d/1X-n96M_Lf64EqqsQDt0uCDlZtXoschzk/view Sugoi-Japanese-Translator-V3.0.rar]
 
 
Extract to wherever
 
 
Launch via <code>Sugoi-Translator-DeepL (click here).bat</code> if you want to use DeepL or <code>Sugoi-Translator-Papago (click here).bat</code> if you want to use Papago.
 
 
=== Offline ===
 
:1. Download these two files: [https://drive.google.com/file/d/1X-n96M_Lf64EqqsQDt0uCDlZtXoschzk/view Sugoi Version 3.0] and [https://drive.google.com/file/d/1KgAsQzI-A0D8vmNIekwIRKlflGw9xz3i/view the v3.0 Model]
 
  
:2. Extract Sugoi-Japanese-Translator-V3.0.rar wherever
+
Installation procedure probably won't change between versions, check the Patreon or the website for newer versions.
  
:3. Extract the folders contained in Offline Model V3.0.zip to <code><your Sugoi Directory>\backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\</code>
+
:1. Download [https://archive.org/details/sugoi-toolkit-v-8.0-public-link-1234324]
 +
:2. Extract to wherever
 +
=== Online Method ===
 +
:3. Launch via <code>Sugoi-Toolkit (click here).bat</code> and select an online translation method, for era games use <code>Sugoi Translator DeepL</code> or <code>Sugoi Translator Papago</code>
  
Launch via the included <code>Sugoi-Translator-Offline (click here).bat</code> file. Should open two command windows and the translation window. It takes a minute or so to start working.
+
=== Offline Method ===
 +
:3. Launch via <code>Sugoi-Toolkit (click here).bat</code> and select <code>Sugoi Translator Offline</code>
 +
'''Read before using:''' The offline version of this program requires 8 GB of RAM to run. Very CPU intensive unless you do the steps below.
  
 
==== Using CUDA to Improve Performance of Offline Version ====
 
==== Using CUDA to Improve Performance of Offline Version ====
Line 32: Line 25:
  
 
===== Method 1: Using a premade powershell script =====
 
===== Method 1: Using a premade powershell script =====
[https://cdn.discordapp.com/attachments/795551389211164703/902472195954065428/InstallCudaForSugoiV3.zip Download & read the included "install cuda.txt" file]
+
[https://cdn.discordapp.com/attachments/795551389211164703/1093241615377764472/CudaInstallForToolKit5.zip Download & read the included "readme.txt" file]
 +
 
 +
===== Method 2: Manually upgrade by pip using python included in Sugoi =====
 +
 
 +
1. Open command prompt or powershell and go to <code><your Sugoi Directory>\Power-Source\Python39</code>
 +
 
 +
2. Type:
 +
<code>python.exe -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade</code>
  
Mega link for those allergic to discord: https://mega.nz/file/k00m2JSa#NmOd2nt6JpIbv1_LOIStQCQwbpS70pMMfUiE6kAn2pg
+
3. In <code>backendServer\Program-Backend\Sugoi-Japanese-Translator\offlineTranslation\fairseq\flaskServer.py</code> change line 19 <code># ja2en.cuda()</code> to <code>ja2en.cuda()</code>
  
===== Method 2: Manually upgrade by pip using python included in Sugoi =====
+
===== Method 3: Manually upgrade by pip using global python installation on Windows (Not recommended)=====
1. Open command prompt as administrator (not powershell) go to <code><your Sugoi Directory>\Power-Source\Python38</code>
+
1. Open command prompt or powershell
  
 
2. Type:
 
2. Type:
 +
<code>pip install --target=<your Sugoi Directory>\Power-Source\Python39\Lib\site-packages torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade</code>
 +
 +
2. Change line 19(may vary a bit depending on version) in <code>backendServer\Program-Backend\Sugoi-Japanese-Translator\offlineTranslation\fairseq\flaskServer.py</code> from <code># ja2en.cuda()</code> to <code>ja2en.cuda()</code>
  
CUDA 10:
+
=== Running on Linux ===
    python.exe -m pip install torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html --user
+
Sugoi itself doesn't run on Linux (even through Wine), but you can use the models through [[https://git.sr.ht/~asdf/sugee sugee]] and [[https://github.com/arzeth/sugoi-web sugoi-web]]
  
CUDA 11:
+
1. git clone sugee.
    python.exe -m pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html --user
 
  
3. In <code>backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\flaskServer.py</code> change line 19 <code># ja2en.cuda()</code> to <code>ja2en.cuda()</code>
+
2. Create a Python 3.9 venv and activate it:
  
===== Method 3: Manually upgrade by pip using global python installation on Windows=====
+
<code>
1. Open command prompt (or powershell) as administrator and type:
+
python3.9 -m venv venv
  
CUDA 10:
+
source venv/bin/activate
    pip install --target=<your Sugoi Directory>\Power-Source\Python38\Lib\site-packages --upgrade torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
+
</code>
  
CUDA 11:
+
3. Follow the sugee installation instructions in the readme.
    pip install --target=<your Sugoi Directory>\Power-Source\Python38\Lib\site-packages --upgrade torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
 
  
2. Change line 19 in <code>backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\flaskServer.py</code> from <code># ja2en.cuda()</code> to <code>ja2en.cuda()</code>
+
4. Run sugoi-web and follow the instructions on the page.
  
 
== Notable Era Quirks ==
 
== Notable Era Quirks ==
 +
(If anyone finds anything that should be in this section mention Harris#0425 on discord or post in the plw thread for it to be added)
  
*By default, this only attempts to translate copied text that contains a Japanese character. Not a problem for it's original purpose, which was for translating VN's, but with text games you run into the unique problem of ASCII menus and world maps, which invariably contain at least one character that'll set it off, making it try to translate hundreds of gibberish characters and gangraping all your CPU cores. With in i7-8700 and no CUDA the bamboo forest map in TW locked my entire computer up for a good ten seconds and my cooling fans made a solid attempt at takeoff. I'm trying to fiddle with clipboard settings in the anchor to avoid this but as of yet I've had no success. Will post update in its own section when/if I or someone else figures it out.
+
*By default, this only attempts to translate copied text that contains a Japanese character. Not a problem for it's original purpose, which was for translating VN's, but with text games you run into the unique problem of ASCII menus and world maps, which invariably contain at least one character that'll set it off, making it try to translate hundreds of gibberish characters and gangraping all your CPU cores. With in i7-8700 and no CUDA the bamboo forest map in TW locked my entire computer up for a good ten seconds and my cooling fans made a solid attempt at takeoff. https://gitgud.io/CMD32bit/era-clipboard
*Sugoi (and DeepL in general) really do not like mixed language inputs. If it's only one or two words it should be fine but if multiple sentences sneak in there's a good chance it'll get confused and print nothing, or just give you the english back and drop the JP text entirely. If you see this happen, just open your log and re-copy the Japanese manually.  
+
** Please download this autohotkey script: https://gitgud.io/CMD32bit/era-clipboard (you can use the compiled exe version if you want) to use with Sugoi to avoid the above scenario.
 +
*Sugoi (and DeepL) really do not like mixed language inputs. If it's only one or two words it should be fine but if multiple sentences sneak in there's a good chance it'll get confused and print nothing, or just give you the english back and drop the JP text entirely. If you see this happen, just open your log and re-copy the Japanese manually.  
 
*Anyone that's used DeepL for a while has experienced that 'thing' it does, where instead of translating what you gave it it goes, "It’s a good idea to have a good idea of what you’re looking for" or "I'm sure you will find a way to make it work for you." or shit like that. It's a quirk of how the AI was trained or something. The online version of Sugoi suffers from this, since it's basically just a fancy DeepL client, but the Offline version never does this.
 
*Anyone that's used DeepL for a while has experienced that 'thing' it does, where instead of translating what you gave it it goes, "It’s a good idea to have a good idea of what you’re looking for" or "I'm sure you will find a way to make it work for you." or shit like that. It's a quirk of how the AI was trained or something. The online version of Sugoi suffers from this, since it's basically just a fancy DeepL client, but the Offline version never does this.
 +
 +
==Additional resources==
 +
* Model files: To install them you need to need to replace file <code>big.pretrain.pt</code> in folder: <code>\backendServer\Program-Backend\Sugoi-Japanese-Translator\offlineTranslation\fairseq\japaneseModel</code> .
 +
** Sugoi tools V.6 [https://drive.google.com/file/d/1VHNkRLrIXUbZBaD1ETHDqowfzk3GZ21b/view download]
 +
[[Category:Contributing]]

Latest revision as of 14:56, 15 March 2025

This guide is OLD. It should still work but needs revamped for modern versions of Sugoi.

Whatis[edit]

Sugoi is a translation tool made by leminhyen2 on github. It reads from your clipboard and automatically translates through your choice of DeepL, Papago, or his homebrewed AI based translation model. The repo for the program is here but it's outdated. You can get the newest versions from the website, the developer's patreon, developer's discord or Archive.org keep in mind the model required for offline translation is included in the download.

Installing[edit]

Sugoi is built for Windows 10. For Windows 7 users: You need Visual C++ 10, 13 and 15~22 x86 & x64 versions. This program does not work on x86 systems.

Installation procedure probably won't change between versions, check the Patreon or the website for newer versions.

1. Download [1]
2. Extract to wherever

Online Method[edit]

3. Launch via Sugoi-Toolkit (click here).bat and select an online translation method, for era games use Sugoi Translator DeepL or Sugoi Translator Papago

Offline Method[edit]

3. Launch via Sugoi-Toolkit (click here).bat and select Sugoi Translator Offline

Read before using: The offline version of this program requires 8 GB of RAM to run. Very CPU intensive unless you do the steps below.

Using CUDA to Improve Performance of Offline Version[edit]

IMPORTANT: WORKS FOR NVIDIA GPUs ONLY

Before doing anything, check in NVIDIA control panel > system information > component tab and see what CUDA version you have. v3.xx only works with CUDA v11.xx+, 2.0 works with CUDA 10.xx

Method 1: Using a premade powershell script[edit]

Download & read the included "readme.txt" file

Method 2: Manually upgrade by pip using python included in Sugoi[edit]

1. Open command prompt or powershell and go to <your Sugoi Directory>\Power-Source\Python39

2. Type: python.exe -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade

3. In backendServer\Program-Backend\Sugoi-Japanese-Translator\offlineTranslation\fairseq\flaskServer.py change line 19 # ja2en.cuda() to ja2en.cuda()

Method 3: Manually upgrade by pip using global python installation on Windows (Not recommended)[edit]

1. Open command prompt or powershell

2. Type: pip install --target=<your Sugoi Directory>\Power-Source\Python39\Lib\site-packages torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade

2. Change line 19(may vary a bit depending on version) in backendServer\Program-Backend\Sugoi-Japanese-Translator\offlineTranslation\fairseq\flaskServer.py from # ja2en.cuda() to ja2en.cuda()

Running on Linux[edit]

Sugoi itself doesn't run on Linux (even through Wine), but you can use the models through [sugee] and [sugoi-web]

1. git clone sugee.

2. Create a Python 3.9 venv and activate it:

python3.9 -m venv venv

source venv/bin/activate

3. Follow the sugee installation instructions in the readme.

4. Run sugoi-web and follow the instructions on the page.

Notable Era Quirks[edit]

(If anyone finds anything that should be in this section mention Harris#0425 on discord or post in the plw thread for it to be added)

  • By default, this only attempts to translate copied text that contains a Japanese character. Not a problem for it's original purpose, which was for translating VN's, but with text games you run into the unique problem of ASCII menus and world maps, which invariably contain at least one character that'll set it off, making it try to translate hundreds of gibberish characters and gangraping all your CPU cores. With in i7-8700 and no CUDA the bamboo forest map in TW locked my entire computer up for a good ten seconds and my cooling fans made a solid attempt at takeoff. https://gitgud.io/CMD32bit/era-clipboard
  • Sugoi (and DeepL) really do not like mixed language inputs. If it's only one or two words it should be fine but if multiple sentences sneak in there's a good chance it'll get confused and print nothing, or just give you the english back and drop the JP text entirely. If you see this happen, just open your log and re-copy the Japanese manually.
  • Anyone that's used DeepL for a while has experienced that 'thing' it does, where instead of translating what you gave it it goes, "It’s a good idea to have a good idea of what you’re looking for" or "I'm sure you will find a way to make it work for you." or shit like that. It's a quirk of how the AI was trained or something. The online version of Sugoi suffers from this, since it's basically just a fancy DeepL client, but the Offline version never does this.

Additional resources[edit]

  • Model files: To install them you need to need to replace file big.pretrain.pt in folder: \backendServer\Program-Backend\Sugoi-Japanese-Translator\offlineTranslation\fairseq\japaneseModel .