ogkalu2 / comic-translate

Desktop app for automatically translating comics - BDs, Manga, Manhwa, Fumetti and more in a variety of formats (Image, Pdf, Epub, cbr, cbz, etc) and in multiple languages.
Apache License 2.0
530 stars 47 forks source link

Black bubbles problem #64

Closed Sterben1579 closed 3 weeks ago

Sterben1579 commented 3 weeks ago

Whenever I load a page with black speech bubbles, it clears the bubbles. It does the translation but doesn't place the translated text back into the bubbles. I have another small problem. I use GPT-4 for high-quality translation, but it gives an error with even the slightest slang. Is there a translation tool that accepts slang and is as good as GPT

e3414a97-7c06-4644-8c35-2fb3d61d59e7_translated

ogkalu2 commented 3 weeks ago

Try again with the latest update. You can try gemini 1.5 pro for your slang issue. you can get an api key here - https://aistudio.google.com/ and you have 50 free requests per day

let me know if this solves your issues

Sterben1579 commented 3 weeks ago

When I downloaded the latest version, the black speech bubble issue was resolved, but now I have new problems.

Firstly, following your advice, I used Gemini 1.5 Pro. Sometimes, I get errors like "An Error occurred: 429 Resource has been exhausted (e.g. check quota).." or "An Error occurred: block_reason: OTHER." This is not a huge problem, but the biggest issue is that it cannot translate mangas containing nudity. As soon as it sees a couple of breasts, it immediately refuses to translate.

My second problem is that I cannot translate webtoons. As you know, webtoon pages are quite long. While trying to capture the "YOLO" boxes, it gives the error "WARNING ⚠️ imgsz=[12083, 800] must be multiple of max stride 32, updating to [12096, 800]." I would be very grateful if you could solve these two problems.

ogkalu2 commented 3 weeks ago

I've just updated the app. There is now a new checkbox setting called "Provide Image to LLMs as context". It's ticked on by default. Untick it and see if you can now translate such kinds of manga. Again i recommend Gemini in these situations as it's the most allowing of all the LLM models.

That warning for webtoons is not something you need to be concerned about, the app will still work. That said, i recommend cropping the image in 2 if you still have issues with the output image.

ogkalu2 commented 3 weeks ago

If you don't want to crop the image then open pipeline.py, on line 294 which is: conf = Config(hd_strategy="Resize", hd_strategy_resize_limit=640) you can increase the value of hd_strategy_resize_limit to something like 1000 but word of warning, this will make the process slower.

Sterben1579 commented 3 weeks ago

i have a question

When I tried all the translation models, the highest quality one was undoubtedly GPT-4o. It maintains the connection between sentences incredibly well. However, unfortunately, GPT-4o is very expensive in my country when priced in dollars. Do you know any place where I can get the GPT API cheaply?

ogkalu2 commented 3 weeks ago

Unfortunately, it's not possible to get 4o any cheaper.