mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-20 15:32:32 +08:00
Adds COMFY_API_MAX_RETRIES, COMFY_API_RETRY_DELAY, and COMFY_API_RETRY_BACKOFF environment variables that override the default retry parameters for all API node HTTP requests (sync_op, sync_op_raw, upload_file, download_url_to_bytesio). Users in regions with unstable networks (e.g. behind the GFW in China) can increase the retry budget to tolerate longer network interruptions: COMFY_API_MAX_RETRIES=10 COMFY_API_RETRY_DELAY=2.0 python main.py Defaults remain unchanged (3 retries, 1.0s delay, 2.0x backoff) when the env vars are not set. |
||
|---|---|---|
| .. | ||
| compare | ||
| execution | ||
| inference | ||
| __init__.py | ||
| conftest.py | ||
| README.md | ||
| test_asset_seeder.py | ||
| test_retry_defaults.py | ||
Automated Testing
Running tests locally
Additional requirements for running tests:
pip install pytest
pip install websocket-client==1.6.1
opencv-python==4.6.0.66
scikit-image==0.21.0
Run inference tests:
pytest tests/inference
Quality regression test
Compares images in 2 directories to ensure they are the same
- Run an inference test to save a directory of "ground truth" images
pytest tests/inference --output_dir tests/inference/baseline
-
Make code edits
-
Run inference and quality comparison tests
pytest