-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/install_snapshot
- Loading branch information
Showing
53 changed files
with
3,529 additions
and
903 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,20 +32,20 @@ jobs: | |
- name: Build distribution | ||
run: python -m build --sdist --wheel --outdir dist/ | ||
|
||
- name: Publish distribution to TestPyPI for Validation | ||
uses: pypa/[email protected] | ||
with: | ||
repository_url: https://test.pypi.org/legacy/ | ||
# - name: Publish distribution to TestPyPI for Validation | ||
# uses: pypa/[email protected] | ||
# with: | ||
# repository_url: https://test.pypi.org/legacy/ | ||
|
||
- name: Clear pip cache | ||
run: pip cache purge | ||
|
||
- name: Install Comfy CLI from Test Pypi and Test | ||
run: | | ||
for i in {1..3}; do | ||
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple comfy-cli==${{env.VERSION}} && break || sleep 5 | ||
done | ||
comfy --help | ||
# - name: Clear pip cache | ||
# run: pip cache purge | ||
|
||
# - name: Install Comfy CLI from Test Pypi and Test | ||
# run: | | ||
# for i in {1..3}; do | ||
# pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple comfy-cli==${{env.VERSION}} && break || sleep 5 | ||
# done | ||
# comfy --help | ||
|
||
- name: Publish distribution to Official PyPI | ||
uses: pypa/[email protected] | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: ruff_check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ruff_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: install ruff | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
- name: lint check and then format check with ruff | ||
run: | | ||
ruff check | ||
ruff format --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: "Test CLI Tool on GPU runners" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "comfy_cli/**" | ||
- "!comfy_cli/test_**" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "comfy_cli/**" | ||
- "!comfy_cli/test_**" | ||
|
||
jobs: | ||
test-cli-gpu: | ||
name: "Run Tests on GPU Runners" | ||
runs-on: | ||
group: gpu-runners | ||
labels: ${{ matrix.os }}-x64-gpu # | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [linux] | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check Nvidia | ||
run: | | ||
nvidia-smi | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Check disk space | ||
run: | | ||
df -h | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -e . | ||
- name: Test e2e | ||
id: test-e2e | ||
env: | ||
PYTHONPATH: ${{ github.workspace }} | ||
TEST_E2E: true | ||
TEST_E2E_COMFY_INSTALL_FLAGS: --nvidia --cuda-version 11.8 | ||
TEST_E2E_COMFY_LAUNCH_FLAGS_EXTRA: "" | ||
run: | | ||
pytest tests/e2e | ||
- name: Retry test e2e but without gpu | ||
if: ${{ failure() && steps.test-e2e.conclusion == 'failure' }} | ||
env: | ||
PYTHONPATH: ${{ github.workspace }} | ||
TEST_E2E: true | ||
run: | | ||
pytest tests/e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.6.1 | ||
hooks: | ||
- id: black | ||
language_version: python3.9 | ||
- repo: https://github.com/pylint-dev/pylint | ||
rev: v2.16.2 | ||
hooks: | ||
- id: pylint | ||
args: | ||
- --disable=R,C,W,E0401 | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,33 @@ This guide provides an overview of how to develop in this repository. | |
|
||
`pip install -e .` | ||
|
||
3. Test script running | ||
3. Set ENVIRONMENT variable to DEV. | ||
|
||
`export ENVIRONMENT=dev` | ||
|
||
4. Test script running | ||
|
||
`comfy --help` | ||
|
||
4. Use pre commit hook | ||
5. Use pre commit hook | ||
|
||
`pre-commit install` | ||
|
||
## Debug | ||
|
||
You can add following config to your VSCode `launch.json` to launch debugger. | ||
|
||
```json | ||
{ | ||
"name": "Python Debugger: Run", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "comfy_cli.__main__", | ||
"args": [], | ||
"console": "integratedTerminal" | ||
} | ||
``` | ||
|
||
## Make changes to the code base | ||
|
||
There is a potential need for you to reinstall the package. You can do this by | ||
|
@@ -64,6 +83,26 @@ def remove(name: str): | |
- Use `rich` for all console output | ||
- For progress reporting, use either [`rich.progress`](https://rich.readthedocs.io/en/stable/progress.html) | ||
|
||
## Develop comfy-cli and ComfyUI-Manager (cm-cli) together | ||
### Make changes to both | ||
1. Fork your own branches of `comfy-cli` and `ComfyUI-Manager`, make changes | ||
2. Be sure to commit any changes to `ComfyUI-Manager` to a new branch, and push to remote | ||
|
||
### Try out changes to both | ||
1. clone the changed branch of `comfy-cli`, then live install `comfy-cli`: | ||
- `pip install -e comfy-cli` | ||
2. Go to a test dir and run: | ||
- `comfy --here install --manager-url=<path-or-url-to-fork-of-ComfyUI-Manager>` | ||
3. Run: | ||
- `cd ComfyUI/custom_nodes/ComfyUI-Manager/ && git checkout <changed-branch> && cd -` | ||
4. Further changes can be pulled into these copies of the `comfy-cli` and `ComfyUI-Manager` repos | ||
|
||
### Debug both simultaneously | ||
1. Follow instructions above to get working install with changes | ||
2. Add breakpoints directly to code: `import ipdb; ipdb.set_trace()` | ||
3. Execute relevant `comfy-cli` command | ||
|
||
|
||
## Contact | ||
|
||
If you have any questions or need further assistance, please contact the project maintainer at [???](mailto:[email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.