QiuYannnn / Local-File-Organizer

An AI-powered file management tool that ensures privacy by organizing local texts, images. Using Llama3.2 3B and Llava v1.6 models with the Nexa SDK, it intuitively scans, restructures, and organizes files for quick, seamless access and easy retrieval.
MIT License
1.65k stars 115 forks source link

CPU/GPU usage limits #4

Closed kaxlabs closed 1 month ago

kaxlabs commented 1 month ago

Any way to add limits to how many resources are utilized during the sorting? My computer slows to nearly a stop while trying to use this.

tech-and-techno commented 1 month ago

In data_processing.py file, there are 2 lines that look like this: with Pool(cpu_count()) as pool:. If you change the part from cpu_count() to cpu_count() / 2 then the program will use half of your available CPU threads.

These are the 2 mentioned lines:

  1. https://github.com/QiuYannnn/Local-File-Organizer/blob/main/data_processing.py#L146
  2. https://github.com/QiuYannnn/Local-File-Organizer/blob/main/data_processing.py#L234

Try it out.