tti-function/init.sh
Niklas Mueller e4b4f364df INIT
2024-08-05 18:44:01 +02:00

16 lines
1.1 KiB
Bash

#!/bin/bash
env >> /etc/environment
# Copy Models/Artefacts to needed locations
cp /app/input/assets/unet/diffusion_pytorch_model.bin /root/.cache/huggingface/hub/models--RunDiffusion--Juggernaut-XL-v8/snapshots/9022a900377ce2d3303d3e6d86b09f6874e1e2a7/unet/diffusion_pytorch_model.bin
cp /app/input/assets/vae/diffusion_pytorch_model.bin /root/.cache/huggingface/hub/models--RunDiffusion--Juggernaut-XL-v8/snapshots/9022a900377ce2d3303d3e6d86b09f6874e1e2a7/vae/diffusion_pytorch_model.bin
cp /app/input/assets/text_encoder_2/pytorch_model.bin /root/.cache/huggingface/hub/models--RunDiffusion--Juggernaut-XL-v8/snapshots/9022a900377ce2d3303d3e6d86b09f6874e1e2a7/text_encoder_2/pytorch_model.bin
cp /app/input/assets/text_encoder/pytorch_model.bin /root/.cache/huggingface/hub/models--RunDiffusion--Juggernaut-XL-v8/snapshots/9022a900377ce2d3303d3e6d86b09f6874e1e2a7/text_encoder/pytorch_model.bin
# Run Application
for file in /app/input/file_queues/*.json; do
cp $file /app/tasks/current_task.json
/usr/local/bin/python /app/runner.py
rm /app/tasks/current_task.json
done