Skip to content

Commit cd73051

Browse files
authored
Merge branch 'main' into feat/multiprompt_dynamic_node
2 parents 1bc72ed + 44458d6 commit cd73051

32 files changed

+1121
-94
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ This repo also includes a WebRTC server and UI that uses comfystream to support
88
- [Quick Start](#quick-start)
99
- [Docker DevContainer](#docker-devcontainer)
1010
- [Docker Image](#docker-image)
11+
- [RunPod](#runpod)
12+
- [Tensordock](#tensordock)
1113
- [Download Models](#download-models)
1214
- [Install package](#install-package)
1315
- [Custom Nodes](#custom-nodes)
@@ -21,6 +23,7 @@ This repo also includes a WebRTC server and UI that uses comfystream to support
2123
## Quick Start
2224

2325
### Docker DevContainer
26+
2427
Refer to [.devcontainer/README.md](.devcontainer/README.md) to setup ComfyStream in a devcontainer using a pre-configured ComfyUI docker environment.
2528

2629
For other installation options, refer to [Install ComfyUI and ComfyStream](https://pipelines.livepeer.org/docs/technical/install/local-testing) in the Livepeer pipelines documentation.
@@ -37,6 +40,10 @@ Refer to the documentation at [https://pipelines.livepeer.org/docs/technical/get
3740

3841
The RunPod template [livepeer-comfystream](https://runpod.io/console/deploy?template=w01m180vxx&ref=u8tlskew) can be used to deploy to RunPod.
3942

43+
#### Tensordock
44+
45+
We also have a python script that can be used to spin up a ComfyStream instance on a [Tensordock server](https://tensordock.com/). Refer to [scripts/README.md](scripts/README.md) for instructions.
46+
4047
## Download Models
4148

4249
Refer to [src/comfystream/scripts/README.md](src/comfystream/scripts/README.md) for instructions to download commonly used models.
@@ -180,7 +187,7 @@ npm run dev
180187

181188
By default the app will be available at <http://localhost:3000>.
182189

183-
The Stream URL is the URL of the [server](#run-server) which defaults to <http://127.0.0.1:8888>.
190+
The Stream URL is the URL of the [server](#run-server) which defaults to <http://127.0.0.1:8889>.
184191

185192
> [!NOTE]
186193
> To run the UI on HTTPS (necessary for webcam functionality), use `npm run dev:https`. You'll need to accept the self-signed certificate in your browser.

configs/models.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ models:
5757
url: "https://civitai.com/api/download/models/276570?type=Model&format=SafeTensor"
5858
path: "loras/SD1.5/ral-chrome-sd15.safetensors"
5959
type: "lora"
60+
61+
outfitToOutfit_v20:
62+
name: "outfitToOutfit_v20"
63+
url: "https://huggingface.co/EmmaJohnson311/outfitToOutfit/resolve/main/outfitToOutfit_v20_sd15.safetensors"
64+
path: "controlnet/outfitToOutfit_v20.safetensors"
65+
type: "controlnet"

docker/Dockerfile.base

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ COPY . /workspace/comfystream
3232

3333
# Copy ComfyStream files into ComfyUI
3434
COPY ./nodes/ /workspace/ComfyUI/custom_nodes/
35-
COPY ./workflows/ui* /workspace/ComfyUI/user/default/workflows/examples
35+
COPY ./workflows* /workspace/ComfyUI/user/default/workflows
3636

3737
# WORKDIR /workspace/comfystream
3838

scripts/README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ComfyUI Helper Scripts
2+
3+
This directory contains various helper scripts designed to streamline working with ComfyStream:
4+
5+
- `spinup_comfystream_tensordock.py`: Spins up a ComfyStream instance on a [Tensordock server](https://tensordock.com/), installs dependencies, and starts the server.
6+
7+
## Usage Instructions
8+
9+
### Spinup TensorDock ComfyStream Instance
10+
11+
1. **Create a Tensordock Account**: Register at [Tensordock](https://dashboard.tensordock.com/register), attach a credit card, and create an API key and token.
12+
2. **Check Available Options** *(Optional but Recommended)*:
13+
To see all available script options, run:
14+
15+
```bash
16+
python spinup_comfystream_tensordock.py --help
17+
```
18+
19+
3. **Run the Script**:
20+
Execute the following command to spin up a ComfyStream instance:
21+
22+
```bash
23+
python spinup_comfystream_tensordock.py --api-key <API_KEY> --api-token <API_TOKEN>
24+
```
25+
26+
4. **Access the Server**:
27+
The script will set up the instance, install dependencies, and start the server. This process will take a few minutes. Once completed, you can access the ComfyStream server and UI using the provided URLs.
28+
29+
5. **Stop the Server**:
30+
To stop the server, run:
31+
32+
```bash
33+
python spinup_comfystream_tensordock.py --delete <VM_ID>
34+
```
35+
36+
Replace `<VM_ID>` with the ID of the VM you want to delete. You can find the VM ID in the script logs or the [Tensordock dashboard](https://dashboard.tensordock.com/).
37+
38+
> [!NOTE]
39+
> By default, the ComfyUI port is not publicly exposed for security reasons. However, you can enable public access using the `--expose-comfyui` flag. Credentials will be provided in the logs, but keep in mind that this is not a foolproof security measure, and exposing the port may pose security risks.
40+
41+
> [!IMPORTANT]
42+
> Due to a known bug in TensorDock, the server may sometimes fail to detect the NVIDIA GPU until it is rebooted. If you experience GPU-related issues, try restarting the server first.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
write_files:
2+
# Add reverse proxy configuration for ComfyUI with basic authentication
3+
- path: /etc/caddy/comfystream.caddy
4+
content: |
5+
:8189 {
6+
reverse_proxy http://127.0.0.1:8188
7+
basic_auth {
8+
comfyadmin <PASSWORD_PLACEHOLDER>
9+
}
10+
}
11+
12+
runcmd:
13+
# Setup auth proxy for ComfyUI (requires port 8189 to be open)
14+
- curl -1sLf 'https://dl.cloudsmith.io/public/caddy/testing/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-testing-archive-keyring.gpg
15+
- curl -1sLf 'https://dl.cloudsmith.io/public/caddy/testing/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-testing.list
16+
- sudo apt update
17+
- sudo apt install -y caddy
18+
- echo 'import /etc/caddy/comfystream.caddy' | sudo tee -a /etc/caddy/Caddyfile
19+
- sudo systemctl restart caddy
20+
# Install, configure, and start Comfystream and ComfyUI
21+
- docker pull <DOCKER_IMAGE_PLACEHOLDER>
22+
- mkdir -p ~/models/ComfyUI--models ~/models/ComfyUI--output
23+
- docker run --restart unless-stopped --stop-timeout 300 --gpus all --name comfystream -v ${HOME}/models/ComfyUI--models:/workspace/ComfyUI/models -v ${HOME}/models/ComfyUI--output:/workspace/ComfyUI/output -p 3000:3000 -p 8188:8188 -p 8889:8889 <DOCKER_IMAGE_PLACEHOLDER> --download-models --build-engines --server

scripts/requirements.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# TensorDock Spinup requirements
2+
requests
3+
geopy
4+
colorama
5+
qrcode
6+
qrcode_terminal
7+
click

0 commit comments

Comments
 (0)