ozgrozer / ai-renamer

A Node.js CLI that uses Ollama and LM Studio models (Llava, Gemma, Llama etc.) to intelligently rename files by their contents
https://x.com/ozgrozer/status/1812591967756255298
GNU General Public License v3.0
1.44k stars 89 forks source link

Unsupported file format, fail to prompt, and recognize already renamed files #7

Closed Lutraphobia closed 1 month ago

Lutraphobia commented 1 month ago

Seems that as it's going through old photos and renaming them, it occasionally pops up this error message.

All media is JPG format, however I am suspecting the LLM (llava:13b) not able to open the container or view it due to an older format or implementation of JPEG vs JPG, even if JPEG is renamed.

Would suggest that you add better error correction such as:

1) Cannot change name of file "X"

2) Skips the file and continues without failing back to the prompt

3) Not sure if it's possible to recognize pictures already renamed?

Thank you for this fine implementation of ollama capabilites!

image

ozgrozer commented 1 month ago

Fixed that issue. Now it shows the filenames that have the errors and keep continue renaming.

One way to recognize already processed files is adding them some sort of metadata but not sure if it worths the effort since now you'll be able to see the damaged file.

Screenshot 2024-07-10 at 8 10 06 PM
Lutraphobia commented 1 month ago

Thanks a bunch @ozgrozer!