dreambooth-docker icon indicating copy to clipboard operation
dreambooth-docker copied to clipboard

Error while trying to use local ckpt

Open dathide opened this issue 3 years ago • 2 comments

I placed a model.ckpt in /app, then changed export MODEL_NAME="/app/model.ckpt", but this error was displayed: OSError: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like /app/merged_model.ckpt is not the path to a directory containing a model_index.json file.

  1. What is the proper way to use a local ckpt? Edit:
  2. Is it possible to paste 200 class images into /class_images and have the model use those rather than generate new ones? Edit2:
  3. After running sudo docker compose -f docker-compose.build.yaml exec accelerate config --config_file=/ app/examples/dreambooth/accelerate-config.yaml, I get this error: service "accelerate" is not running container #1

dathide avatar Oct 17 '22 01:10 dathide

hi. Thanks for reporting.

The problem is that the /app/ folder is not mounted completely but only the train.sh script. you could add this line to the docker-compose.build.yaml file at the end of the volumes: list.

(first part before the : is the local host path, the part after the : is the path inside the docker container) - ./app/model.ckpt:/app/examples/dreambooth/model.ckpt

and then change the MODEL_NAME variable in the train.sh script to this: MODEL_NAME="/app/examples/dreambooth/model.ckpt"

that should in theory work. Haven't tested it though.

Will add that information to the readme if it works, or even add a general model mount directory for local model files.

Sharrnah avatar Oct 18 '22 11:10 Sharrnah

To 2: i think if you have already 200 images, it won't generate 200 new ones, but only new ones if they are less than configured. Its depending on how the https://github.com/ShivamShrirao/diffusers/tree/main/examples/dreambooth script actually works.

This repo is only intended for a more simple setup without the whole dependency hassle, especially under windows. It installs the above mentioned script without modification when you build the docker image yourself using this repo.

So every information you find about the above repo will also work with this repo. Just with the difference that it is all in a single docker container.

To 3. oops. i think i missed the actual service name in that command. It should be docker compose -f docker-compose.build.yaml exec dreambooth accelerate config --config_file=/app/examples/dreambooth/accelerate-config.yaml

Sharrnah avatar Oct 18 '22 11:10 Sharrnah