generated from replicate/cog-comfyui
-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (50 loc) · 1.51 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Push
on:
workflow_dispatch:
inputs:
models:
description: 'Comma-separated list of models (standalone, trained14b) to push or "all"'
type: string
default: 'all'
jobs:
cog-safe-push:
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Cog
run: |
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)"
sudo chmod +x /usr/local/bin/cog
- name: cog login
run: |
echo ${{ secrets.COG_TOKEN }} | cog login --token-stdin
- name: Install cog-safe-push
run: |
pip install git+https://github.com/replicate/cog-safe-push.git
- name: Install custom nodes
run: |
python ./scripts/install_custom_nodes.py
- name: Push selected models
env:
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
run: |
if [ "${{ inputs.models }}" = "all" ]; then
models="standalone trained14b"
else
models="${{ inputs.models }}"
fi
for model in ${models//,/ }; do
echo "==="
echo "==="
echo "=== Pushing $model"
echo "==="
echo "==="
./scripts/select-model $model
cog-safe-push --config cog-safe-push-configs/$model.yaml -vv
done