# omarleel/parallelmangatranslator architecture

> Architecture diagram of the GitHub repository omarleel/parallelmangatranslator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omarleel/parallelmangatranslator
- Repository: https://github.com/omarleel/parallelmangatranslator

## Overview

ParallelMangaTranslator procesa carpetas de páginas: la ejecución configura y distribuye imágenes, cada imagen se limpia y se traduce, y los resultados se guardan como imágenes y transcripciones JSON. El flujo de traducción detecta texto, lo traduce con un proveedor tradicional o un LLM y lo renderiza sobre la página limpia. También hay ramas documentadas para descargar ZIP desde Google Drive y generar PDF. Algunas conexiones de módulos no muestreados se omiten; las capacidades documentadas se conservan sin atribuirles llamadas no verificadas.

Main entry points: [`ParallelMangaTranslator.py`](https://github.com/omarleel/parallelmangatranslator/blob/main/ParallelMangaTranslator.py) (Punto de entrada), [`Applications/inpaint/base.py`](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/base.py) (Motores inpainting), [`Applications/TranslateManga.py`](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/TranslateManga.py) (Flujo de traducción), [`Applications/Utilities.py`](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/Utilities.py) (Utilidades y PDF)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Ejecución y lotes"]
  node_entry["Punto de entrada"]
  node_config["Configuración<br/>[AppConfig.py]"]
  node_batch["Procesador de lotes"]
end

subgraph group_image["Imagen y limpieza"]
  node_image_processor["Procesador de imágenes<br/>[ImageProcessor.py]"]
  node_clean["Limpieza manga<br/>[CleanManga.py]"]
  node_inpaint["Motores inpainting<br/>[base.py]"]
  node_aot["Red AOT<br/>[aot.py]"]
  node_lama["Red LaMa<br/>[lama.py]"]
  node_ffc["Capas FFC<br/>[ffc.py]"]
  node_model_modules["Capas de modelo<br/>[modules.py]"]
  node_patch_match["Patch match<br/>[patch_match.py]"]
end

subgraph group_translation["Traducción"]
  node_translate["Flujo de traducción<br/>[TranslateManga.py]"]
  node_ocr["Reconocimiento OCR<br/>[OcrManager.py]"]
  node_translator["Gestor traductores"]
  node_google["Google Translate"]
  node_groq["Groq LLM"]
  node_render["Renderizado de texto<br/>[TextRendering.py]"]
end

subgraph group_resources["Archivos y recursos"]
  node_json["Escritor JSON<br/>[JsonGenerator.py]"]
  node_output[("Salidas locales")]
  node_utilities["Utilidades y PDF<br/>[Utilities.py]"]
  node_remote_download["Descarga de recursos"]
  node_constants["Rutas y modelos<br/>[Constantes.py]"]
end

node_user(("Usuario"))
node_drive["Google Drive"]

node_user -->|"inicia"| node_entry
node_entry -->|"construye configuración"| node_config
node_entry -->|"descarga recursos"| node_utilities
node_entry -->|"configura"| node_image_processor
node_entry -->|"inicia procesamiento"| node_batch
node_batch -->|"despacha lotes"| node_image_processor
node_image_processor -->|"limpia página"| node_clean
node_image_processor -->|"traduce página"| node_translate
node_clean -->|"selecciona motor"| node_inpaint
node_inpaint -->|"usa arquitectura"| node_aot
node_inpaint -->|"usa arquitectura"| node_lama
node_lama -->|"usa capas"| node_ffc
node_inpaint -->|"importa capas"| node_model_modules
node_inpaint -->|"usa algoritmo"| node_patch_match
node_translate -->|"extrae texto"| node_ocr
node_translate -->|"traduce texto"| node_translator
node_translate -->|"renderiza traducción"| node_render
node_translator -->|"traducción tradicional"| node_google
node_translator -.->|"traducción contextual"| node_groq
node_batch -->|"envía colas"| node_json
node_translate -->|"envía datos JSON"| node_output
node_json -->|"guarda JSON"| node_output
node_image_processor -->|"guarda imágenes"| node_output
node_utilities -->|"descarga recursos"| node_remote_download
node_utilities -.->|"descarga ZIP"| node_drive
node_utilities -.->|"genera PDF"| node_output
node_utilities -->|"usa rutas"| node_constants
node_remote_download -->|"usa ubicaciones"| node_constants

click node_entry "https://github.com/omarleel/parallelmangatranslator/blob/main/ParallelMangaTranslator.py"
click node_config "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/AppConfig.py"
click node_batch "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/ParallelProcessor.py"
click node_image_processor "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/ImageProcessor.py"
click node_clean "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/CleanManga.py"
click node_inpaint "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/base.py"
click node_aot "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/aot.py"
click node_lama "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/lama.py"
click node_ffc "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/ffc.py"
click node_model_modules "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/modules.py"
click node_patch_match "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/patch_match.py"
click node_translate "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/TranslateManga.py"
click node_ocr "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/OcrManager.py"
click node_translator "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/TranslatorManager.py"
click node_render "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/TextRendering.py"
click node_json "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/JsonGenerator.py"
click node_utilities "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/Utilities.py"
click node_remote_download "https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/RemoteFileDownloader.py"
click node_constants "https://github.com/omarleel/parallelmangatranslator/blob/main/Utils/Constantes.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_config,node_batch toneBlue
class node_image_processor,node_clean,node_inpaint,node_aot,node_lama,node_ffc,node_model_modules,node_patch_match toneAmber
class node_translate,node_ocr,node_translator,node_google,node_groq,node_render toneMint
class node_json,node_output,node_utilities,node_remote_download,node_constants toneRose
class node_user,node_drive toneIndigo
```

## Components

### Ejecución y lotes

- [Punto de entrada](https://github.com/omarleel/parallelmangatranslator/blob/main/ParallelMangaTranslator.py): `ParallelMangaTranslator.py`
- [Configuración](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/AppConfig.py): `Applications/AppConfig.py`
- [Procesador de lotes](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/ParallelProcessor.py): `Applications/ParallelProcessor.py`

### Imagen y limpieza

- [Procesador de imágenes](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/ImageProcessor.py): `Applications/ImageProcessor.py`
- [Limpieza manga](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/CleanManga.py): `Applications/CleanManga.py`
- [Motores inpainting](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/base.py): `Applications/inpaint/base.py`
- [Red AOT](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/aot.py): `Applications/inpaint/aot.py`
- [Red LaMa](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/lama.py): `Applications/inpaint/lama.py`
- [Capas FFC](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/ffc.py): `Applications/inpaint/ffc.py`
- [Capas de modelo](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/modules.py): `Applications/inpaint/modules.py`
- [Patch match](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/inpaint/patch_match.py): `Applications/inpaint/patch_match.py`

### Traducción

- [Flujo de traducción](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/TranslateManga.py): `Applications/TranslateManga.py`
- [Reconocimiento OCR](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/OcrManager.py): `Applications/OcrManager.py`
- [Gestor traductores](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/TranslatorManager.py): `Applications/TranslatorManager.py`
- **Google Translate**
- **Groq LLM**
- [Renderizado de texto](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/TextRendering.py): `Applications/TextRendering.py`

### Archivos y recursos

- [Escritor JSON](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/JsonGenerator.py): `Applications/JsonGenerator.py`
- **Salidas locales**
- [Utilidades y PDF](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/Utilities.py): `Applications/Utilities.py`
- [Descarga de recursos](https://github.com/omarleel/parallelmangatranslator/blob/main/Applications/RemoteFileDownloader.py): `Applications/RemoteFileDownloader.py`
- [Rutas y modelos](https://github.com/omarleel/parallelmangatranslator/blob/main/Utils/Constantes.py): `Utils/Constantes.py`

### Other components

- **Usuario**
- **Google Drive**

## Connections

- Usuario → Punto de entrada: inicia (evidence: `README.md`)
- Punto de entrada → Configuración: construye configuración (evidence: `ParallelMangaTranslator.py`)
- Punto de entrada → Utilidades y PDF: descarga recursos (evidence: `ParallelMangaTranslator.py`)
- Punto de entrada → Procesador de imágenes: configura (evidence: `ParallelMangaTranslator.py`)
- Punto de entrada → Procesador de lotes: inicia procesamiento (evidence: `ParallelMangaTranslator.py`)
- Procesador de lotes → Procesador de imágenes: despacha lotes (evidence: `Applications/ParallelProcessor.py`)
- Procesador de imágenes → Limpieza manga: limpia página (evidence: `Applications/ImageProcessor.py`)
- Procesador de imágenes → Flujo de traducción: traduce página (evidence: `Applications/ImageProcessor.py`)
- Limpieza manga → Motores inpainting: selecciona motor (evidence: `Applications/CleanManga.py`)
- Motores inpainting → Red AOT: usa arquitectura (evidence: `Applications/inpaint/base.py`)
- Motores inpainting → Red LaMa: usa arquitectura (evidence: `Applications/inpaint/base.py`)
- Red LaMa → Capas FFC: usa capas (evidence: `Applications/inpaint/lama.py`)
- Motores inpainting → Capas de modelo: importa capas (evidence: `Applications/inpaint/base.py`)
- Motores inpainting → Patch match: usa algoritmo (evidence: `Applications/inpaint/base.py`)
- Flujo de traducción → Reconocimiento OCR: extrae texto (evidence: `Applications/TranslateManga.py`)
- Flujo de traducción → Gestor traductores: traduce texto (evidence: `Applications/TranslateManga.py`)
- Flujo de traducción → Renderizado de texto: renderiza traducción (evidence: `Applications/TranslateManga.py`)
- Gestor traductores → Google Translate: traducción tradicional (evidence: `Applications/TranslatorManager.py`)
- Gestor traductores → Groq LLM: traducción contextual (evidence: `README.md`)
- Procesador de lotes → Escritor JSON: envía colas (evidence: `Applications/ParallelProcessor.py`)
- Flujo de traducción → Salidas locales: envía datos JSON (evidence: `Applications/TranslateManga.py`)
- Escritor JSON → Salidas locales: guarda JSON
- Procesador de imágenes → Salidas locales: guarda imágenes (evidence: `Applications/ImageProcessor.py`)
- Utilidades y PDF → Descarga de recursos: descarga recursos (evidence: `Applications/Utilities.py`)
- Utilidades y PDF → Google Drive: descarga ZIP (evidence: `README.md`)
- Utilidades y PDF → Salidas locales: genera PDF (evidence: `README.md`)
- Utilidades y PDF → Rutas y modelos: usa rutas (evidence: `Applications/Utilities.py`)
- Descarga de recursos → Rutas y modelos: usa ubicaciones (evidence: `Applications/RemoteFileDownloader.py`)
