jtreminio commited on
Commit
04c12f9
·
verified ·
1 Parent(s): 79538a8

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -8,6 +8,8 @@
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
 
 
11
  *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
  *.model filter=lfs diff=lfs merge=lfs -text
13
  *.msgpack filter=lfs diff=lfs merge=lfs -text
@@ -33,3 +35,29 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
  *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
  *.model filter=lfs diff=lfs merge=lfs -text
15
  *.msgpack filter=lfs diff=lfs merge=lfs -text
 
35
  *.zip filter=lfs diff=lfs merge=lfs -text
36
  *.zst filter=lfs diff=lfs merge=lfs -text
37
  *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
60
+ wheels/flash_attn-2.7.4+cu130torch2.9-cp312-cp312-linux_x86_64.whl filter=lfs diff=lfs merge=lfs -text
61
+ wheels/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl filter=lfs diff=lfs merge=lfs -text
62
+ wheels/sageattn3-1.0.0-cp312-cp312-linux_x86_64.whl filter=lfs diff=lfs merge=lfs -text
63
+ wheels/torchaudio-2.9.1+a224ab2-cp312-cp312-linux_x86_64.whl filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ flash-attention
2
+ sageattention
3
+ torchaudio
4
+ tmp
Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG CONTAINER_VERSION=25.10-py3
2
+ FROM nvcr.io/nvidia/pytorch:${CONTAINER_VERSION}
3
+ LABEL maintainer="Juan Treminio <jtreminio@gmail.com>"
4
+
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ ENV DOTNET_INSTALL_DIR=/usr/share/dotnet
7
+ ENV DOTNET_ROOT=${DOTNET_INSTALL_DIR}
8
+
9
+ RUN apt update &&\
10
+ apt install -y libgl1-mesa-dev ffmpeg libglib2.0-0 libgl1 &&\
11
+ apt-get autoclean &&\
12
+ apt-get -y --purge autoremove &&\
13
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/{man,doc}
14
+
15
+ RUN curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh &&\
16
+ chmod +x /tmp/dotnet-install.sh &&\
17
+ /tmp/dotnet-install.sh --version latest --install-dir "${DOTNET_INSTALL_DIR}" &&\
18
+ rm -f /tmp/dotnet-install.sh
19
+
20
+ ENV PATH="${DOTNET_INSTALL_DIR}:${PATH}"
21
+
22
+ COPY wheels /tmp/wheels
23
+ RUN python -m pip install --upgrade \
24
+ torchao>=0.15.0 \
25
+ safetensors>=0.7.0 \
26
+ torchsde>=0.2.6 \
27
+ rotary_embedding_torch>=0.8.9 \
28
+ tokenizers>=0.22.2 \
29
+ SQLAlchemy>=2.0.45 \
30
+ &&\
31
+ python -m pip install --no-cache-dir /tmp/wheels/*.whl \
32
+ && rm -rf /tmp/wheels
33
+
34
+ ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcuda.so.1
35
+ ENV SWARM_NO_VENV=true
36
+ RUN git config --global --add safe.directory '*'
37
+ EXPOSE 7801
38
+
39
+ ENTRYPOINT ["bash", "/workspace/launch-linux-dev.sh", "--launch_mode", "none", "--host", "0.0.0.0"]
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Juan Treminio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # swarm-container
2
+
3
+ This repo builds a [SwarmUI](https://github.com/mcmonkeyprojects/SwarmUI)-ready container with:
4
+
5
+ * [flash_attn @ 2.7.4](https://github.com/Dao-AILab/flash-attention)
6
+ * [sageattention @ 2.2.0](https://github.com/thu-ml/SageAttention)
7
+ * [sageattn @ 3 (compiled)](https://github.com/thu-ml/SageAttention/tree/main/sageattention3_blackwell)
8
+ * [torchaudio @ 2.9.1 (compiled)](https://github.com/pytorch/audio)
9
+
10
+ It is built on top of the [nvidia PyTorch images nvcr.io/nvidia/pytorch](https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/index.html).
11
+
12
+ # Requirements
13
+
14
+ * A Blackwell GPU
15
+ * RTX 50-series
16
+ * RTX Pro 6000
17
+ * RTX Pro 5000
18
+ * Docker or Podman
19
+
20
+ # Getting Started
21
+
22
+ The image is available on DockerHub, so all you need to do is have the [SwarmUI repo](https://github.com/mcmonkeyprojects/SwarmUI) cloned locally.
23
+ Replace `/path/to/SwarmUI` with the path you've cloned SwarmUI at locally and run one of the following:
24
+
25
+ ## All model paths as default
26
+
27
+ ```bash
28
+ docker run --gpus all --rm -it --shm-size=512m --name swarmui \
29
+ -p 7801:7801 \
30
+ -v /path/to/SwarmUI:/workspace \
31
+ jtreminio/swarmui:latest
32
+ ```
33
+
34
+ Then navigate to [http://localhost:7801/](http://localhost:7801/).
35
+
36
+ ## Define different model and config paths
37
+
38
+ ```bash
39
+ docker run --gpus all --rm -it --shm-size=512m --name swarmui \
40
+ -p 7801:7801 \
41
+ -v /path/to/SwarmUI:/workspace \
42
+ -v /path/to/local/output_directory:/workspace/Output \
43
+ -v /path/to/local/wildcard_directory:/workspace/Data/Wildcards \
44
+ jtreminio/swarmui:latest
45
+ ```
46
+
47
+ Then navigate to [http://localhost:7801/](http://localhost:7801/).
48
+
49
+ # Building
50
+
51
+ If you would like to build the image for yourself, simply run:
52
+
53
+ ```bash
54
+ # compiles flash_attn, sageattention, torchaudio, etc
55
+ ./step-1.sh
56
+ # builds the Docker image for reuse
57
+ ./step-2.sh
58
+ ```
59
+
60
+ There are two steps because `docker build` does not have a `--gpus all` option, so you cannot compile anything that requires a GPU.
VERSION ADDED
@@ -0,0 +1 @@
 
 
1
+ 25.10-py3
compile-sageattention.sh ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -e
3
+ set -o pipefail
4
+
5
+ python -m pip install -U wheel setuptools
6
+
7
+ cd /workspace/sageattention
8
+ python setup.py install
9
+ python setup.py bdist_wheel
10
+ cp -av /workspace/sageattention/dist/*.whl /workspace/wheels
11
+
12
+ cd /workspace/sageattention/sageattention3_blackwell
13
+ python setup.py install
14
+ python setup.py bdist_wheel
15
+ cp -av /workspace/sageattention/sageattention3_blackwell/dist/*.whl /workspace/wheels
compile-torchaudio.sh ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -e
3
+ set -o pipefail
4
+
5
+ cd /workspace/torchaudio
6
+ apt update
7
+ apt update && apt install -y libsox-dev libavformat-dev libavcodec-dev libavutil-dev libavdevice-dev ffmpeg libavfilter-dev libswresample-dev libswscale-dev
8
+ pip install -U pynvml>=12.0.0 sentencepiece soundfile cmake ninja cupy-cuda13x cuda-python nvidia-ml-py pybind11 torchcodec
9
+
10
+ export PYTORCH_VERSION="$(python3 -c 'import torch; print(torch.__version__)')"
11
+ export USE_CUDA=1
12
+ export USE_FFMPEG=1
13
+ export BUILD_SOX=1
14
+ export TORIO_USE_FFMPEG_VERSION=6
15
+ export TORCH_CUDA_ARCH_LIST="8.7 9.0 10.0 11.0+PTX"
16
+ export CUDA_ARCH_LIST="8.7 9.0 10.0 11.0"
17
+ export USE_CUDNN=1
18
+ export USE_CUSPARSELT=1
19
+ PYBIND11_INC="$(python3 -c 'import pybind11, sys; print(pybind11.get_include())')"
20
+ export CPATH="$PYBIND11_INC${CPATH:+:$CPATH}"
21
+ export CXXFLAGS="-I$PYBIND11_INC ${CXXFLAGS:-}"
22
+ export CPLUS_INCLUDE_PATH=/usr/local/cuda-13.0/targets/sbsa-linux/include/cccl:${CPLUS_INCLUDE_PATH}
23
+ export CPATH=/usr/local/cuda-13.0/targets/sbsa-linux/include/cccl:${CPATH}
24
+ export MAX_JOBS=8
25
+
26
+ BUILD_SOX=1 TORCH_CUDA_ARCH_LIST=11.0 USE_CUDA=1 python3 -m pip install -v . --no-use-pep517 --no-build-isolation --no-deps
27
+ BUILD_SOX=1 TORCH_CUDA_ARCH_LIST=11.0 USE_CUDA=1 python3 -m pip wheel -v . --no-use-pep517 --no-build-isolation --no-deps -w /workspace/wheels
step-1.sh ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -e
3
+ set -o pipefail
4
+
5
+ CONTAINER_VERSION="$(tr -d '[:space:]' < VERSION)"
6
+
7
+ if [[ ! -d "sageattention" ]]; then
8
+ git clone https://github.com/thu-ml/SageAttention.git sageattention
9
+ fi
10
+
11
+ if [[ ! -d "torchaudio" ]]; then
12
+ git clone https://github.com/pytorch/audio.git torchaudio
13
+ fi
14
+
15
+ if [[ ! -d "torchaudio" ]]; then
16
+ git clone https://github.com/Dao-AILab/flash-attention.git flash-attention
17
+ fi
18
+
19
+ cd torchaudio && git checkout release/2.9 && cd ..
20
+ mkdir -p wheels
21
+
22
+ # flash-attn 2 from at https://github.com/mjun0812/flash-attention-prebuild-wheels/releases
23
+
24
+ docker run --gpus all --rm -it --shm-size=512m \
25
+ -v "${PWD}:/workspace" \
26
+ "nvcr.io/nvidia/pytorch:${CONTAINER_VERSION}" \
27
+ /bin/bash -c "bash compile-sageattention.sh && bash compile-torchaudio.sh"
step-2.sh ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -e
3
+ set -o pipefail
4
+
5
+ CONTAINER_VERSION="$(tr -d '[:space:]' < VERSION)"
6
+
7
+ docker image build \
8
+ --build-arg CONTAINER_VERSION=${CONTAINER_VERSION} \
9
+ -f Dockerfile \
10
+ -t "jtreminio/swarmui:${CONTAINER_VERSION}" \
11
+ -t "jtreminio/swarmui:latest" \
12
+ .
wheels/flash_attn-2.7.4+cu130torch2.9-cp312-cp312-linux_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95717cc7f94b3f372c7470f2c8a5d59452e07c6f8b73fa769736a2f1cbfa243d
3
+ size 371267188
wheels/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a930a569d7131c6faf1355763af1e609c381cd1449e8322b79ea22a71cc8127
3
+ size 3208022
wheels/sageattn3-1.0.0-cp312-cp312-linux_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e66b3e8c642b9fc55c0382e3dd7fc6a008509ee63cee76f1f1551a2079f32932
3
+ size 1737447
wheels/torchaudio-2.9.1+a224ab2-cp312-cp312-linux_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fec3c8a8c67ed8a349742a9d403ad5d68c5b462de5f35217737953b3e713c38c
3
+ size 908812