Skip to content

Commit b18caaf

Browse files
committed
feat(stability): removed nodes and flows that require too specific extra nodes
Signed-off-by: bigcat88 <[email protected]>
1 parent 3dcf668 commit b18caaf

File tree

6 files changed

+177
-1
lines changed

6 files changed

+177
-1
lines changed
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Flows Install
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: flows_install-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
github_flows_install:
17+
name: Flows Install GitHub Ubuntu 24
18+
runs-on: ubuntu-24.04
19+
env:
20+
DATABASE_URI: postgresql+psycopg://vix_user:vix_password@localhost:5432/vix_db
21+
22+
services:
23+
postgres:
24+
image: postgres:17
25+
env:
26+
POSTGRES_USER: vix_user
27+
POSTGRES_PASSWORD: vix_password
28+
POSTGRES_DB: vix_db
29+
options: >-
30+
--health-cmd pg_isready
31+
--health-interval 10s
32+
--health-timeout 5s
33+
--health-retries 5
34+
ports:
35+
- 5432:5432
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Checkout Visionatrix (engine)
40+
uses: actions/checkout@v4
41+
with:
42+
repository: Visionatrix/Visionatrix
43+
path: visionatrix_main
44+
45+
- uses: actions/setup-python@v5
46+
with:
47+
python-version: '3.12'
48+
49+
- name: Install Visionatrix dependencies
50+
working-directory: visionatrix_main
51+
run: |
52+
python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
53+
python3 -m pip install ".[pgsql]"
54+
55+
- name: Export Visionatrix exclude flows
56+
run: |
57+
value=$(python3 scripts/ci/get_excludes.py flows)
58+
echo "VISIONATRIX_EXCLUDE_FLOWS=$value" >> "$GITHUB_ENV"
59+
60+
- name: Export Visionatrix exclude nodes
61+
run: |
62+
value=$(python3 scripts/ci/get_excludes.py nodes)
63+
echo "VISIONATRIX_INSTALL_EXCLUDE_NODES=$value" >> "$GITHUB_ENV"
64+
65+
- name: Run Visionatrix install
66+
working-directory: visionatrix_main
67+
run: python3 -m visionatrix install
68+
69+
- name: Install flows from CMD
70+
working-directory: visionatrix_main
71+
run: |
72+
echo "Y" | VIX_MODE=SERVER VIX_SERVER_FULL_MODELS=0 python3 -m visionatrix install-flow --name=*
73+
74+
- name: Generate openapi-flows.json
75+
working-directory: visionatrix_main
76+
run: |
77+
VIX_MODE=SERVER VIX_SERVER_FULL_MODELS=0 python3 -m visionatrix openapi --flows="*" --exclude-base --file=openapi-flows.json
78+
79+
- name: Create test user
80+
working-directory: visionatrix_main
81+
run: |
82+
VIX_MODE=SERVER VIX_SERVER_FULL_MODELS=0 python3 -m visionatrix create-user --name=user --password=user
83+
84+
- name: Start Visionatrix in Server mode
85+
working-directory: visionatrix_main
86+
run: |
87+
nohup python3 -m visionatrix run --ui --mode=SERVER > visionatrix.log 2>&1 &
88+
echo "Server started in background with PID $!"
89+
90+
- name: Wait for Visionatrix server
91+
run: |
92+
max_attempts=30
93+
for i in $(seq 1 $max_attempts); do
94+
echo "Attempt $i/$max_attempts: Checking Visionatrix server..."
95+
if curl -s http://localhost:8288/whoami > /dev/null; then
96+
echo "Visionatrix server is up!"
97+
exit 0
98+
fi
99+
echo "Server not ready yet. Sleeping 10s..."
100+
sleep 10
101+
done
102+
echo "Server not responding after 5 minutes!"
103+
exit 1
104+
105+
- name: Download test image
106+
working-directory: visionatrix_main
107+
run: |
108+
wget -O tests/source-cube_rm_background.png "https://github.com/Visionatrix/VixFlowsDocs/blob/main/tests_data/source-cube_rm_background.png?raw=true"
109+
110+
- name: Create task for each Flow
111+
working-directory: visionatrix_main
112+
run: python3 tests/create_flow_tasks.py
113+
114+
- name: Display logs
115+
if: ${{ always() }}
116+
working-directory: visionatrix_main
117+
run: cat visionatrix.log

ex_app/lib/exclude_flows.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
EXCLUDE_FLOWS_IDS = [
2+
"all_your_life",
3+
]

ex_app/lib/exclude_nodes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
EXCLUDE_NODES_IDS = [
2+
"https://github.com/Fannovel16/ComfyUI-Frame-Interpolation",
3+
"https://github.com/shiimizu/ComfyUI-PhotoMaker-Plus",
4+
"https://github.com/FizzleDorf/ComfyUI_FizzNodes",
5+
]

ex_app/lib/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from nc_py_api.ex_app.providers.task_processing import TaskProcessingProvider
3030
from starlette.middleware.base import BaseHTTPMiddleware
3131
from starlette.responses import FileResponse, Response
32-
from supported_flows import FLOWS_IDS
32+
from task_processing_flows import FLOWS_IDS
3333

3434
# ---------Start of configuration values for manual deploy---------
3535
# Uncommenting the following lines may be useful when installing manually.
File renamed without changes.

scripts/ci/get_excludes.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Tiny helper for GitHub Actions.
4+
5+
Usage:
6+
python3 scripts/ci/get_excludes.py flows # → prints "id1;id2;…"
7+
python3 scripts/ci/get_excludes.py nodes # → prints "url1;url2;…"
8+
9+
It simply echoes the semicolon-joined list so the caller can redirect it
10+
into the desired environment variable.
11+
"""
12+
13+
from __future__ import annotations
14+
15+
import importlib.util
16+
import sys
17+
from pathlib import Path
18+
from collections.abc import Sequence
19+
20+
21+
def _import_list(file: Path, var: str) -> Sequence[str]:
22+
spec = importlib.util.spec_from_file_location(file.stem, file)
23+
module = importlib.util.module_from_spec(spec) # type: ignore[arg-type]
24+
spec.loader.exec_module(module) # type: ignore[attr-defined]
25+
value: list[str] | Sequence[str] = getattr(module, var, [])
26+
if not isinstance(value, list | tuple):
27+
raise TypeError(f"{file}:{var} is not a list/tuple")
28+
return value
29+
30+
31+
def main() -> None:
32+
if len(sys.argv) != 2 or sys.argv[1] not in {"flows", "nodes"}:
33+
print("Usage: get_excludes.py [flows|nodes]", file=sys.stderr)
34+
sys.exit(1)
35+
36+
mode = sys.argv[1]
37+
repo_root = Path(__file__).resolve().parents[2] # <repo>/scripts/ci/…
38+
39+
if mode == "flows":
40+
py_file = repo_root / "ex_app" / "lib" / "exclude_flows.py"
41+
var_name = "EXCLUDE_FLOWS_IDS"
42+
else: # nodes
43+
py_file = repo_root / "ex_app" / "lib" / "exclude_nodes.py"
44+
var_name = "EXCLUDE_NODES_IDS"
45+
46+
items = _import_list(py_file, var_name)
47+
print(";".join(items))
48+
49+
50+
if __name__ == "__main__":
51+
main()

0 commit comments

Comments
 (0)