Skip to contentSkip to content

Output Directory and Workflow

In the “Translation Task” card on the translation page, you can set the main output directory and choose the processing mode. This guide focuses on the output-path controls, the nine workflows, and their effect on outputs and processing stages. Adding inputs and list states are in File List and Input; start, progress, and stop states are in Progress, Stop, and Task State.

What this part handles

This guide covers:

  • Entering, browsing, and opening the output directory.
  • The nine options of the “Translation Workflow Mode:” combo box, and the button and hint text after switching.
  • Input discovery, output files, processing stages, skipped stages, and mutual-exclusion limits for each mode.

It does not define the parameter algorithms of detectors, OCR, translators, inpainting, or renderers, nor does it treat workflow selection as translator or API candidate-slot switching. Setting multiple workflow fields manually is not a GUI-supported combination.

Use it on the Translation page

Setting the output directory

  1. Type a path in the input next to “Output Directory:”, or drag an output folder into the input. The placeholder text is “Select or drag output folder...”.
  2. Click “Browse...” to open the directory-selection action and choose a target folder.
  3. Click “Open” to ask the system to open the selected output directory.
  4. After choosing files, select the processing mode in “Translation Workflow Mode:” and click that mode’s start button.

In the source, the output input and the Browse/Open buttons connect to the controller’s directory-selection and open actions. This static review did not launch the GUI, so the actual dialog text when a directory does not exist, is not writable, or fails to open still needs a runtime check. The output directory does not replace the per-image work directory; JSON, TXT, and inpainted images still follow the input image’s work-directory rules.

Choosing a workflow

When the combo box changes, the GUI first clears the eight mutually exclusive CLI workflow fields, then sets only the field for the selected mode and saves the configuration. Switching also updates the title, description text, and start button; it never starts a task automatically.

After a selection, the title shows the current mode and the subtitle shows the matching hint. For example, Export Translation hints to check manga_translator_work/translations/, and Import Translation and Render hints to read TXT from manga_translator_work/originals/ or translations/, preferring _original.txt. These paths are program-displayed hints and work-directory names, not private user paths.

How the task runs

Normal output chain

Normal Translation conditionally runs colorization and upscaling, then proceeds through detection, OCR, text-line merging, translation, mask refinement, inpainting, and rendering. When there are no detection boxes or OCR text, the core may return the input image or the upscaled image early. Normal Translation is the only mode that may enter the batch_concurrent pipeline.

flowchart LR
    Input["Main input image"] --> Pre["Conditional: colorize -> upscale"]
    Pre --> Detect["Detect"] --> OCR["OCR"] --> Merge["Merge lines"] --> Translate["Translate"]
    Translate --> Mask["Refine mask"] --> Inpaint["Inpaint"] --> Render["Render"] --> Output["Main image in output directory"]
    Translate --> Json["save_text=true: project JSON"]

Stages and outputs of the nine modes

WorkflowInput/discoveryOutputRunning stagesSkipped or special boundary
Normal TranslationMain input imageMain output image; project JSON when save_text=true; inpainted image when inpainting runs; editor base when colorization/upscaling is enabledConditional colorize → upscale → detect → OCR → merge → translate → mask → inpaint → renderMay return early when no detection boxes or OCR text; the only mode that uses the concurrent pipeline
Export TranslationMain input image and an available templateProject JSON, <stem>_translated.<template-format>; no main output imageConditional colorize → upscale → detect → OCR → merge → translate; refine mask when regions and raw mask existSkips inpainting, rendering, and main-image saving; generate_and_export=true; skips mask refinement and does not save the mask when YOLO labels are imported
Export Original TextMain input image and an available templateProject JSON, <stem>_original.<template-format>; no main output imageConditional colorize → upscale → detect → OCR → merge; mask refinement is usually possibleEnters the export branch only with template=true and save_text=true; skips translation, inpainting, rendering, and main-image saving; YOLO exception matches Export Translation
Translate JSON OnlyMust find a project JSON; supports legacy region lists and the new regions objectWrites the project JSON back; deletes the same-image original sidecar on success; no main output imageLoad JSON → translate → write JSON backSkips colorize, upscale, detect, OCR, merge, mask, inpaint, and render; saving does not depend on save_text
Import Translation and RenderRequires a project JSON; TXT prefers the original sidecar, otherwise the translation sidecarMain output image and updated project JSON; inpainted image when neededRead JSON/in-memory payload → reuse or refine mask → inpaint → renderSkips colorize, upscale, detect, OCR, merge, and translate; extra detection when JSON has no mask and YOLO labels are imported; reuses an existing inpainted image and may skip real inpainting with an AI renderer
Colorize OnlyMain input imageMain output image; editor base when colorization is activeConditional colorizeSkips upscale, detect, OCR, merge, translate, mask, inpaint, and render; does not force a colorizer, so none may pass the image through
Upscale OnlyMain input image; ratio from upscale.upscale_ratioMain output image; editor base when colorization or a ratio is enabledConditional colorize → conditional upscaleSkips detect, OCR, merge, translate, mask, inpaint, and render; does not force a ratio, so an empty ratio keeps the colorized result or the original
Inpaint OnlyMain input imageMain output image; the branch clears text_regions and does not render translationConditional colorize → upscale → detect → fill detected lines with literal TEXT → merge → mask → inpaintSkips OCR, translation, and rendering; may return an uninpainted image when no lines/mask/merged regions exist; an AI renderer skips real inpainting and uses the working image
Replace TranslationRaw image; a same-name translated image must exist in the work directoryMain output image; the re-render branch can write an inpainted image and JSON, the direct-paste branch writes neither nor PSDBoth images conditional colorize → upscale → detect → OCR → merge → region pairing → inpaint and render, or paste text directlyDoes not call a translation service; forces disable_auto_wrap=true and layout_mode='strict'; enable_template_alignment=true uses direct paste, and paste_mask_dilation_pixels is consumed only by that branch

A workflow’s display name describes its goal and does not always auto-enable the related model: for example, Upscale Only does not force a ratio and the source may still run an enabled colorizer first; Colorize Only does not force the colorizer from none to a concrete implementation.

Workflow mutual exclusion and concurrency

When the GUI switches, the eight boolean fields are mutually exclusive. When the combo box is synced from an existing configuration, the source priority is: Replace Translation, Inpaint Only, Upscale Only, Colorize Only, Import Translation, Translate JSON Only, Export Original Text, Export Translation, Normal. Manual JSON, service requests, or other entry points can provide combinations, but runtime dispatch handles them with a fixed priority; there is no “run simultaneously” contract.

batch_concurrent is incompatible with Import Translation, JSON-only, both exports, Colorize Only, Upscale Only, Inpaint Only, and Replace Translation; both the desktop controller and the core treat these modes as non-concurrent. Special modes do not become concurrent pipelines just because the UI still saves a concurrent configuration.

Task limitations

  • The main input must be an image supported by the file service; folder additions recurse and naturally sort, skipping directories named manga_translator_work. Archives and documents are recognized by the same service, but sidecar pairing inside archives is not yet runtime-verified.
  • Export Translation and Export Original Text depend on a readable template; an invalid template format falls back to json. Import Translation, JSON-only, and Replace Translation depend on the corresponding project JSON, TXT, or pair image.
  • cli.overwrite checks existing TXT, sidecar, or main output images per mode before starting; the overwrite prompt and the JSON-only behavior when the original sidecar is missing still need confirmation in the deployed version.
  • cli.save_text defaults to true in the Qt/release configuration and affects the normal mode’s JSON, inpainted images, and project writes; Export Original Text requires it to enter the export branch. JSON-only writes JSON back unconditionally.
  • The models, VRAM, network, and API cost of colorization, upscaling, detection, OCR, inpainting, and rendering are decided by the selected stage parameters; this guide does not repeat them.