invoke-ai/InvokeAI · error
Duplicate destination thumbnail path: {move.new_thumbnail_pa
Error message
Duplicate destination thumbnail path: {move.new_thumbnail_path} What it means
Analogous to duplicate image destinations, two moves in one batch must not claim the same thumbnail destination. preflight_moves tracks new_thumbnail_path values and raises ValueError on a repeat, since each image's thumbnail must land in a unique file.
Source
Thrown at invokeai/app/services/image_moves/image_moves_default.py:442
return job_id
def preflight_moves(self, moves: Sequence[PlannedImageMove]) -> None:
destinations: set[Path] = set()
thumbnail_destinations: set[Path] = set()
for move in moves:
if not move.old_path.exists():
if not move.is_intermediate:
raise FileNotFoundError(f"Source image does not exist: {move.old_path}")
continue
if move.new_path.exists():
raise FileExistsError(f"Destination image already exists: {move.new_path}")
if move.old_path == move.new_path:
raise ValueError(f"Old and new paths are identical for {move.image_name}")
if move.new_path in destinations:
raise ValueError(f"Duplicate destination path: {move.new_path}")
destinations.add(move.new_path)
if move.new_thumbnail_path in thumbnail_destinations:
raise ValueError(f"Duplicate destination thumbnail path: {move.new_thumbnail_path}")
thumbnail_destinations.add(move.new_thumbnail_path)
if self._has_active_job_for_image(move.image_name):
raise ValueError(f"Image {move.image_name} already has an active image move job")
self._assert_same_filesystem(move.old_path, move.new_path)
if move.old_thumbnail_path.exists():
if move.new_thumbnail_path.exists():
raise FileExistsError(f"Destination thumbnail already exists: {move.new_thumbnail_path}")
self._assert_same_filesystem(move.old_thumbnail_path, move.new_thumbnail_path)
def _record_missing_source_errors(self, moves: Sequence[PlannedImageMove]) -> tuple[list[PlannedImageMove], int]:
remaining_moves: list[PlannedImageMove] = []
errors = 0
for move in moves:
if move.old_path.exists() or move.is_intermediate:
remaining_moves.append(move)
continue
message = f"Source image does not exist: {move.old_path}"
self.create_error_move_job(move, message)View on GitHub (pinned to 0b6a024f2f)
Solutions
- Ensure thumbnail destinations are derived from unique destination image paths
- De-duplicate or suffix colliding thumbnail paths when planning
- Filter/split batches so each new_thumbnail_path is unique before preflight
Example fix
// before
new_thumb = thumb_dir / img.name # collides for duplicate names
// after
new_thumb = (dest_dir / img.name).with_suffix('.thumb.png') # unique per destination
Defensive patterns
Strategy: validation
Validate before calling
thumbs = [m.new_thumbnail_path for m in moves]
dupes = {t for t in thumbs if thumbs.count(t) > 1}
if dupes:
raise ValueError(f"duplicate thumbnail destinations: {dupes}")
service.preflight_moves(moves) Type guard
def thumbnail_destinations_unique(moves: Sequence[PlannedImageMove]) -> bool:
return len({m.new_thumbnail_path for m in moves}) == len(moves) Try / catch
try:
service.preflight_moves(moves)
except ValueError as e:
if "Duplicate destination thumbnail path" in str(e):
moves = rebuild_thumbnail_paths(moves)
service.preflight_moves(moves)
else:
raise Prevention
- Derive thumbnail destinations from the unique destination image path, never from the bare filename
- De-duplicate thumbnail paths alongside image paths
- Test batch planning against folders containing duplicate image names
When it happens
Trigger: Two distinct images whose planned thumbnail filenames collide (same name into same folder); constructing PlannedImageMove with hand-built thumbnail paths that repeat; batch merging folders with duplicate names where thumbnail naming derives only from the image name.
Common situations: Merging subfolders with identically named images; custom thumbnail-path generation ignoring the source directory; automated scripts generating moves for many folders into one.
Related errors
- Duplicate destination path: {move.new_path}
- LoRA "{lora_key}" already applied to transformer.
- LoRA "{lora_key}" already applied to transformer.
- Cannot create an image move job with no items
- Old and new paths are identical for {move.image_name}
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/e1bd1dced45fea3a.
Report an issue: GitHub.