Skip to content

Batch: masks not generated for 2+ images on Windows; workers>1 crashes, workers=1 completes but skips masks #180

@GH6

Description

@GH6

Describe the bug
Batch runs with 2+ images do not produce masks. With workers > 1 the batch crashes (Windows multiprocessing). With workers = 1 the run finishes without exceptions but no mask files are written. Single-image runs work. Unchecking PSD export makes no difference.

To Reproduce

Launch Panel Cleaner (Windows).

Add 2+ images (e.g., 13 PNGs).

Enable mask generation (PSD checked or unchecked).

Set workers to 8 → Generate Output → batch fails.

Set workers to 1 → Generate Output → completes but no masks saved.

Expected behavior
Masks should be generated per image and outputs written in batch mode, same as single-image runs.

Session Log
Key lines (full log available):

AttributeError: can’t pickle local object inc_progress (workers > 1).

RuntimeError: context has already been set (after prior failure).

CPU mode detected; no CUDA.

Screenshots
N/A

Additional context
Panel Cleaner 2.11.x, Windows 10, 16-core CPU, CUDA not detected (CPU mode). Tried clearing cache, fresh output folder, adjusting detection thresholds/scale—no change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions