Skip to content

Commit

Permalink
feat: ✨ install fix
Browse files Browse the repository at this point in the history
- removed un-needed dependencies
- added a ci to test comfy-embedded
- fixed wheel order install
  • Loading branch information
melMass committed Aug 1, 2023
1 parent c5bbe83 commit 512de60
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/package_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ jobs:
uses: actions/cache/save@v3
with:
path: ${{ env.archive_name }}.zip
key: ${{ env.archive_name }}
key: ${{ env.archive_name }}-${{ hashFiles('reqs.txt') }}
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
name:
description: Release tag / name ?
required: true
default: "latest"
default: 'latest'
type: string
environment:
description: Environment to run tests against
Expand All @@ -27,9 +27,9 @@ jobs:
- name: ♻️ Checking out the repository
uses: actions/checkout@v3
with:
submodules: "recursive"
submodules: 'recursive'
path: ${{ env.repo_name }}

# - name: 📝 Prepare file with paths to remove
# run: |
# find ${{ env.repo_name }} -type f -size +10M > .release_ignore
Expand All @@ -56,7 +56,7 @@ jobs:
else
echo "No .release_ignore file found. Skipping removal of files and directories."
fi
- name: 📦 Building custom comfy nodes
shell: bash
run: |
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
id: cache
with:
path: ${{ env.archive_name }}.zip
key: ${{ env.archive_name }}
key: ${{ env.archive_name }}-${{ hashFiles('reqs.txt') }}
- name: 📦 Unzip wheels
shell: bash
run: |
Expand Down
39 changes: 24 additions & 15 deletions .github/workflows/test_embedded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: 🧪 Test Comfy Portable
on:
workflow_dispatch:
inputs:

invalidate_cache:
description: 'Whether to invalidate the cache or not'
required: false
Expand All @@ -14,28 +13,33 @@ jobs:
env:
repo_name: ${{ github.event.repository.name }}
steps:
- name: ⚠️ Invalidate Cache if Needed
if: ${{ github.event.inputs.invalidate_cache == 'true' }}
run: |
echo "Invalidating Cache..."
rmdir /s /q C:\Users\runner\AppData\Local\Temp\caches
- name: ⚡️ Restore Cache if Available
id: cache-comfy
uses: actions/cache/restore@v3
with:
path: ComfyUI_windows_portable
key: ${{ runner.os }}-comfy-env

- name: 🚡 Download and Extract Comfy
id: download-extract-comfy
if: steps.cache-comfy.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir comfy_temp
curl -L -o comfy_temp/comfyui.7z https://github.com/comfyanonymous/ComfyUI/releases/download/latest/ComfyUI_windows_portable_nvidia_cu118_or_cpu.7z
7z x comfy_temp/comfyui.7z -o./comfy_temp
# mv comfy_temp/ComfyUI_windows_portable/python_embeded .
# mv comfy_temp/ComfyUI_windows_portable/ComfyUI .
# mv comfy_temp/ComfyUI_windows_portable/update .
ls
mv comfy_temp/ComfyUI_windows_portable .
- name: 📦 Cache Comfy Environment
id: cache-comfy
uses: actions/cache@v2
- name: 💾 Store cache
uses: actions/cache/save@v3
if: steps.cache-comfy.outputs.cache-hit != 'true'
with:
path: ComfyUI_windows_portable
key: ${{ runner.os }}-comfy-env
Expand All @@ -50,10 +54,15 @@ jobs:
shell: bash
run: |
# run install
export COMFY_PYTHON="ComfyUI_windows_portable/python_embeded/python.exe"
cd ComfyUI_windows_portable/ComfyUI/
export COMFY_PYTHON="${GITHUB_WORKSPACE}/ComfyUI_windows_portable/python_embeded/python.exe"
cd "${GITHUB_WORKSPACE}/ComfyUI_windows_portable/ComfyUI/"
$COMFY_PYTHON custom_nodes/${{ env.repo_name }}/install.py -w
# check node loading state
cd custom_nodes
$COMFY_PYTHON -c "import ${{ env.repo_name }}"
- name: ⏬ Import mtb_nodes
shell: bash
run: |
export COMFY_PYTHON="${GITHUB_WORKSPACE}/ComfyUI_windows_portable/python_embeded/python.exe"
cd "${GITHUB_WORKSPACE}/ComfyUI_windows_portable/ComfyUI"
$COMFY_PYTHON -s main.py --quick-test-for-ci --cpu
$COMFY_PYTHON -m pip freeze
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
NODE_DISPLAY_NAME_MAPPINGS = {}
NODE_CLASS_MAPPINGS_DEBUG = {}

__version__ = "0.1.2"
__version__ = "0.1.4"


def extract_nodes_from_source(filename):
Expand Down
Loading

0 comments on commit 512de60

Please sign in to comment.