ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

Model Directory

Open ali-m-github opened this issue 2 months ago • 4 comments

Hello, I already have the Flux.1 dev model and the text encoder/VAE. How can I use them in AI Toolkit without having to redownload them again? I can't find a models folder in the toolkit directory.

ali-m-github avatar Nov 06 '25 17:11 ali-m-github

In the docker-compose.yml file, add the following text, ending with the line that imports the models directory under the ai-toolkit-main directory. You only need to download the full versions of the models and place them there, for example, in the Qwen-Image-Edit-2509 folder.

In the new job, set the name or path of the models like this: /app/ai-toolkit/models/Qwen-Image-Edit-2509

This will allow you to use the local directory.


services: ai-toolkit: image: ostris/aitoolkit:latest restart: unless-stopped ports: - "8675:8675" volumes: - ~/.cache/huggingface/hub:/root/.cache/huggingface/hub - ./aitk_db.db:/app/ai-toolkit/aitk_db - ./datasets:/app/ai-toolkit/datasets - ./output:/app/ai-toolkit/output - ./config:/app/ai-toolkit/config - ./models:/app/ai-toolkit/models

hero8152 avatar Nov 07 '25 01:11 hero8152

In the docker-compose.yml file, add the following text, ending with the line that imports the models directory under the ai-toolkit-main directory. You only need to download the full versions of the models and place them there, for example, in the Qwen-Image-Edit-2509 folder.

In the new job, set the name or path of the models like this: /app/ai-toolkit/models/Qwen-Image-Edit-2509

This will allow you to use the local directory.

services: ai-toolkit: image: ostris/aitoolkit:latest restart: unless-stopped ports: - "8675:8675" volumes: - ~/.cache/huggingface/hub:/root/.cache/huggingface/hub - ./aitk_db.db:/app/ai-toolkit/aitk_db - ./datasets:/app/ai-toolkit/datasets - ./output:/app/ai-toolkit/output - ./config:/app/ai-toolkit/config - ./models:/app/ai-toolkit/models

Thank you! Do I put the text encoder file and VAE in the same folder? I already have them so that'd save me time redownloading them.

ali-m-github avatar Nov 07 '25 07:11 ali-m-github

Did you get it working. I get an error that says the model path does not exist. I previously had it working on another install but now I cant remember. Why is there no documentation for this. it's frustrating!

Thoughtpunk avatar Nov 21 '25 03:11 Thoughtpunk

did you get it working? normally you have to add a hugging face token under settings and the models are getting downloaded automatically to ie. "c -> users -> pc_name -> .cache -> huggingface -> hub -> name_of_the_model -> snapshots -> and something like 456asd4f5s6df465sa... " . if it tries to redownload the model each time, even if there already is such a snapshot, you can "hardocde" the path in the aitoolkit when creating a job (or even if you want to continue one). when creating a job , at the top, you have to choose the model architecture , i.e flux blahblah. and under "name or path" you can paste the hardcoded path to this folder "456asd4f5s6df465sa. " (so ie. c:/users blabla snapshots/sd456fs465fa45s6" (and check, if it contains all folders and files (i.e. vae, text_encoder, transformer etc.) ).

MarcelMoczarski avatar Dec 01 '25 17:12 MarcelMoczarski