From bc7ece771dbade5df6a7877eb3485c50cf3499a8 Mon Sep 17 00:00:00 2001 From: mauwii Date: Sun, 20 Nov 2022 07:26:48 +0100 Subject: [PATCH] instead linking modelfile use custom models.yaml --- docker-build/Dockerfile | 9 ++------- docker-build/models.yaml | 8 ++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 docker-build/models.yaml diff --git a/docker-build/Dockerfile b/docker-build/Dockerfile index 3f20e4b6f0..0c47683bbd 100644 --- a/docker-build/Dockerfile +++ b/docker-build/Dockerfile @@ -45,21 +45,16 @@ ARG invokeai_branch=main ARG project_name=invokeai ARG conda_env_file=environment-lin-cuda.yml RUN git clone -b ${invokeai_branch} https://github.com/${invokeai_git}.git "/${project_name}" \ - && cp \ - "/${project_name}/configs/models.yaml.example" \ - "/${project_name}/configs/models.yaml" \ && ln -sf \ "/${project_name}/environments-and-requirements/${conda_env_file}" \ "/${project_name}/environment.yml" \ - && ln -sf \ - /data/models/v1-5-pruned-emaonly.ckpt \ - "/${project_name}/models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt" \ && ln -sf \ /data/outputs/ \ "/${project_name}/outputs" -# set workdir +# set workdir and copy models.yaml WORKDIR "/${project_name}" +COPY docker-build/models.yaml configs/models.yaml # install conda env and preload models ARG conda_prefix=/opt/conda diff --git a/docker-build/models.yaml b/docker-build/models.yaml new file mode 100644 index 0000000000..06155c6478 --- /dev/null +++ b/docker-build/models.yaml @@ -0,0 +1,8 @@ +stable-diffusion-1.5: + description: The newest Stable Diffusion version 1.5 weight file (4.27 GB) + weights: /data/models/v1-5-pruned-emaonly.ckpt + config: ./configs/stable-diffusion/v1-inference.yaml + width: 512 + height: 512 + vae: ./models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt + default: true