mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-30 20:32:45 +08:00
- Add `OpenAIGPTImage2` node (`node_id: OpenAIGPTImage2`) with settings specific to gpt-image-2: quality auto/low/medium/high, background auto/opaque (transparent not supported), all 8 popular size presets, and custom width/height inputs (step=16, max=3840) that override the size preset when both are non-zero - Add `_resolve_gpt_image_2_size` helper that enforces API constraints: max edge ≤ 3840px, multiples of 16, ratio ≤ 3:1, total pixels 655,360–8,294,400 - Add `calculate_tokens_price_image_2` using correct gpt-image-2 rates ($8/1M input, $30/1M output); price badge shows range per quality tier with approximate flag for auto quality - Rename `OpenAIGPTImage1` display name to "OpenAI GPT Image 1 & 1.5", remove gpt-image-2 from its model dropdown, and update its price badge to be model-aware with correct per-model ranges - Add unit tests covering price formulas, size resolution logic, and schema correctness for both nodes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app_test | ||
| assets_test | ||
| comfy_api_test | ||
| comfy_extras_test | ||
| comfy_quant | ||
| comfy_test | ||
| execution_test | ||
| folder_paths_test | ||
| prompt_server_test | ||
| seeder_test | ||
| server/utils | ||
| server_test | ||
| utils | ||
| feature_flags_test.py | ||
| README.md | ||
| requirements.txt | ||
| websocket_feature_flags_test.py | ||
Pytest Unit Tests
Install test dependencies
pip install -r tests-unit/requirements.txt
Run tests
pytest tests-unit/