Rename photos using short AI-generated descriptions from a local LM Studio server.
- Python 3.9+
- LM Studio running a local vision-capable model
- Local server started at
http://localhost:1234
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt- Start LM Studio:
- Open LM Studio
- Load a vision-capable model
- Local Server tab -> Start Server
Dry-run (default):
python rename_photos.py "C:\\path\\to\\photos"Apply renames:
python rename_photos.py "C:\\path\\to\\photos" --applyRecursive scan:
python rename_photos.py "C:\\path\\to\\photos" --recursive --apply- Each image is sent to the local LM Studio server for a 3-6 word description.
- The description is slugified into a filename.
- Collisions are avoided by adding a numeric suffix.
- By default, the tool prints a plan without renaming.
jpg, jpeg, png, webp, bmp, gif
- If the server is not reachable, the script exits with a clear message.
- Filenames are capped at 60 characters.