From 609c9901d92ac2cc656d80c5f6728ab703837dc2 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Tue, 11 Apr 2023 14:46:06 +0200 Subject: [PATCH] more tests on the remote workers --- runpod/runpod-worker-transformers/Dockerfile | 11 ++++++----- runpod/runpod-worker-transformers/runpod_infer.py | 4 ++-- runpod/serverless-automatic/Dockerfile | 5 ++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/runpod/runpod-worker-transformers/Dockerfile b/runpod/runpod-worker-transformers/Dockerfile index 8d294cd..5a6cc39 100644 --- a/runpod/runpod-worker-transformers/Dockerfile +++ b/runpod/runpod-worker-transformers/Dockerfile @@ -53,9 +53,9 @@ RUN pip3 install --upgrade pip && \ pip3 install torch torchvision torchaudio --extra-index-url=https://download.pytorch.org/whl/cu118 && \ pip3 install bitsandbytes && \ pip3 install safetensors && \ - pip3 install sentencepiece triton && \ + pip3 install sentencepiece && \ pip3 install diffusers && \ - pip3 install transformers accelerate xformers triton && \ + pip3 install git+https://github.com/huggingface/transformers accelerate xformers triton && \ pip3 install huggingface-hub && \ pip3 install runpod && \ pip3 cache purge @@ -86,14 +86,15 @@ RUN pip3 install --upgrade pip && \ pip3 install torch torchvision torchaudio --extra-index-url=https://download.pytorch.org/whl/cu118 && \ pip3 install bitsandbytes && \ pip3 install safetensors && \ - pip3 install sentencepiece triton && \ + pip3 install sentencepiece && \ pip3 install diffusers && \ - pip3 install transformers accelerate xformers triton && \ + pip3 install git+https://github.com/huggingface/transformers accelerate xformers triton && \ +# pip3 install rwkv && \ pip3 install huggingface-hub && \ pip3 install runpod && \ pip3 cache purge -RUN mkdir /workspace/repositories +RUN mkdir -p /workspace/repositories && mkdir -p /root/.cache/huggingface COPY --from=builder /workspace/repositories /workspace/repositories/ COPY --from=builder /root/.cache/huggingface /root/.cache/huggingface diff --git a/runpod/runpod-worker-transformers/runpod_infer.py b/runpod/runpod-worker-transformers/runpod_infer.py index 51c934c..48f73cd 100644 --- a/runpod/runpod-worker-transformers/runpod_infer.py +++ b/runpod/runpod-worker-transformers/runpod_infer.py @@ -169,9 +169,9 @@ def load_quantized(model_name, wbits, groupsize, device): from safetensors.torch import load_file as safe_load if device == -1: device = "cpu" - model.load_state_dict(safe_load(str(pt_path), device)) + model.load_state_dict(safe_load(str(pt_path), map_location=device), strict = False) else: - model.load_state_dict(torch.load(str(pt_path))) + model.load_state_dict(torch.load(str(pt_path)), strict = False) model.seqlen = 2048 print('Done.') diff --git a/runpod/serverless-automatic/Dockerfile b/runpod/serverless-automatic/Dockerfile index 1fcbaeb..230dde6 100644 --- a/runpod/serverless-automatic/Dockerfile +++ b/runpod/serverless-automatic/Dockerfile @@ -10,8 +10,11 @@ WORKDIR /workspace # PFG: https://civitai.com/api/download/models/1316 # Hassanblend: https://civitai.com/api/download/models/4635 # Deliberate v2: https://civitai.com/api/download/models/15236 +# ChilloutMix: https://civitai.com/api/download/models/11745 +# AbyssOrangeMix3: https://civitai.com/api/download/models/11811 and VAE https://civitai.com/api/download/models/11811?type=VAE +# OrangeChillMix: https://civitai.com/api/download/models/13549 -RUN wget -O /workspace/stable-diffusion-webui/models/Stable-diffusion/model.safetensors https://civitai.com/api/download/models/4635 +RUN wget -O /workspace/stable-diffusion-webui/models/Stable-diffusion/model.safetensors https://civitai.com/api/download/models/11745 ## Extra downloads (for Hassanblend) RUN wget -O /workspace/stable-diffusion-webui/models/Stable-diffusion/model.vae.safetensors https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors