diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 3731707..800b3fa 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -55,4 +55,4 @@ jobs: *.args.DOCKERHUB_REPO=${{ env.DOCKERHUB_REPO }} *.args.DOCKERHUB_IMG=${{ env.DOCKERHUB_IMG }} *.args.RELEASE_VERSION=${{ env.RELEASE_VERSION }} - sd3.args.HUGGINGFACE_ACCESS_TOKEN=${{ env.HUGGINGFACE_ACCESS_TOKEN }} + *.args.HUGGINGFACE_ACCESS_TOKEN=${{ env.HUGGINGFACE_ACCESS_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 25696b3..639d82d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,6 +57,11 @@ RUN if [ "$MODEL_TYPE" = "sdxl" ]; then \ wget -O models/vae/sdxl-vae-fp16-fix.safetensors https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/resolve/main/sdxl_vae.safetensors; \ elif [ "$MODEL_TYPE" = "sd3" ]; then \ wget --header="Authorization: Bearer ${HUGGINGFACE_ACCESS_TOKEN}" -O models/checkpoints/sd3_medium_incl_clips_t5xxlfp8.safetensors https://huggingface.co/stabilityai/stable-diffusion-3-medium/resolve/main/sd3_medium_incl_clips_t5xxlfp8.safetensors; \ + elif [ "$MODEL_TYPE" = "flux1-schnell" ]; then \ + wget -O models/unet/flux1-schnell.safetensors https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors && \ + wget -O models/clip/clip_l.safetensors https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors && \ + wget -O models/clip/t5xxl_fp16.safetensors https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors && \ + wget -O models/vae/ae.safetensors https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors; \ fi # Stage 3: Final image diff --git a/docker-bake.hcl b/docker-bake.hcl index 99d06fd..7081984 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -15,7 +15,7 @@ variable "HUGGINGFACE_ACCESS_TOKEN" { } group "default" { - targets = ["base", "sdxl", "sd3"] + targets = ["base", "sdxl", "sd3", "flux1-schnell"] } target "base" { @@ -47,3 +47,15 @@ target "sd3" { tags = ["${DOCKERHUB_REPO}/${DOCKERHUB_IMG}:${RELEASE_VERSION}-sd3"] inherits = ["base"] } + +target "flux1-schnell" { + context = "." + dockerfile = "Dockerfile" + target = "final" + args = { + MODEL_TYPE = "flux1-schnell" + HUGGINGFACE_ACCESS_TOKEN = "${HUGGINGFACE_ACCESS_TOKEN}" + } + tags = ["${DOCKERHUB_REPO}/${DOCKERHUB_IMG}:${RELEASE_VERSION}-flux1-schnell"] + inherits = ["base"] +}