[Bug]: ValueError: encoding error 5: Image size exceeds WebP limit of 16383 pixels

Author: My12123Created Aug 14, 2026Updated Aug 14, 2026
Labelsbug

Issue

ValueError: encoding error 5: Image size exceeds WebP limit of 16383 pixels

Command Line Arguments

bash
(manga-image-translator) D:\manga-image-translator>python -m manga_translator local -v --config-file D:\manga-image-translator\examples\config-example2.json --use-gpu  -i "D:\JAM\Downloads\An Ideal Lazy Life"

Console logs

bash
(manga-image-translator) D:\manga-image-translator>python -m manga_translator local -v --config-file D:\manga-image-translator\examples\config-example2.json --use-gpu  -i "D:\JAM\Downloads\An Ideal Lazy Life"
⚠️  Warning: You are using the experimental Python version of this project.
This version is unstable and may break frequently. Please switch to the Rust rewrite for reliability! The rust version is an early release so it might still have some issues. https://github.com/frederik-uni/manga-image-translator-rust
[local] Namespace(verbose=True, attempts=0, ignore_errors=False, model_dir=None, use_gpu=True, use_gpu_limited=False, font_path='', pre_dict=None, post_dict=None, kernel_size=3, context_size=0, batch_size=1, batch_concurrent=False, disable_memory_optimization=False, mode='local', input=['D:\\JAM\\Downloads\\An Ideal Lazy Life'], dest='', format=None, overwrite=False, skip_no_text=False, use_mtpe=False, save_text=False, load_text=False, save_text_file='', prep_manual=False, save_quality=100, config_file='D:\\manga-image-translator\\examples\\config-example2.json')
[local] Running in local mode
[local] Log file created: D:\manga-image-translator\result\log_20260814122127.txt
[local] Skipping as already translated: "D:\JAM\Downloads\An Ideal Lazy Life-translated\Chapter 100\001.jpg". Use --overwrite to overwrite existing translations.
[local] Translating: "D:\JAM\Downloads\An Ideal Lazy Life\Chapter 100\002.webp"
[local] Loading models
[local] Running colorization
[local] Running upscaling
[esgran]: 100%|██████████████████████████████████████████████████████████████████████| 100/100 [00:02<00:00, 34.31it/s]
[local] Running text detection
Input image will be rearranged to square batches before fed into network.
 Rearranged batches will be saved to result/rearrange_%d.png
[local] Running ocr
[Model48pxOCR] prob: 0.31690701842308044  fg: (0, 0, 0) bg: (0, 0, 0)
[Model48pxOCR] prob: 0.7094746828079224  fg: (0, 0, 0) bg: (0, 0, 0)
[Model48pxOCR] prob: 0.964801013469696  fg: (0, 0, 0) bg: (0, 0, 0)
[Model48pxOCR] prob: 0.5788825154304504  fg: (0, 0, 0) bg: (0, 0, 0)
WARNING: [local] No text regions with text! - Skipping
[local] Saving "D:\JAM\Downloads\An Ideal Lazy Life-translated\Chapter 100\002.webp"
ERROR: [local] encoding error 5: Image size exceeds WebP limit of 16383 pixels
ERROR: [local] ValueError: encoding error 5: Image size exceeds WebP limit of 16383 pixels
Traceback (most recent call last):
  File "D:\manga-image-translator\manga_translator\__main__.py", line 95, in <module>
    asyncio.run(dispatch(args))
  File "D:\miniconda3\envs\manga-image-translator\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "D:\miniconda3\envs\manga-image-translator\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "D:\manga-image-translator\manga_translator\__main__.py", line 57, in dispatch
    await translator.translate_path(path, dest, args_dict)
  File "D:\manga-image-translator\manga_translator\mode\local.py", line 180, in translate_path
    raise e
  File "D:\manga-image-translator\manga_translator\mode\local.py", line 176, in translate_path
    if await self.translate_file(file_path, output_dest, params, config):
  File "D:\manga-image-translator\manga_translator\mode\local.py", line 223, in translate_file
    return await self._translate_file(path, dest, config, ctx)
  File "D:\manga-image-translator\manga_translator\mode\local.py", line 283, in _translate_file
    save_result(result, dest, ctx)
  File "D:\manga-image-translator\manga_translator\save.py", line 43, in save_result
    format_handler.save(result, dest, ctx)
  File "D:\manga-image-translator\manga_translator\save.py", line 30, in save
    self._save(result, dest, ctx)
  File "D:\manga-image-translator\manga_translator\save.py", line 52, in _save
    result.save(dest)
  File "D:\miniconda3\envs\manga-image-translator\lib\site-packages\PIL\Image.py", line 2713, in save
    save_handler(self, fp, filename)
  File "D:\miniconda3\envs\manga-image-translator\lib\site-packages\PIL\WebPImagePlugin.py", line 294, in _save
    data = _webp.WebPEncode(
ValueError: encoding error 5: Image size exceeds WebP limit of 16383 pixels

Source: zyddnys/manga-image-translator