ComfyUI/tests-unit/comfy_api_test
Marwan Ahmed e9f8aa9346 feat(api-nodes): add dedicated OpenAI GPT-Image-2 node
- 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>
2026-04-22 05:23:17 +02:00
..
input_impl_test.py Support saving Comfy `VIDEO` type to buffer (#7939) 2025-05-04 23:26:57 -04:00
openai_nodes_test.py feat(api-nodes): add dedicated OpenAI GPT-Image-2 node 2026-04-22 05:23:17 +02:00
video_types_test.py Add `get_duration` method to Comfy VIDEO type (#8122) 2025-05-15 00:11:41 -04:00