Skip to content

[Partner Nodes] feat: add Krea2 Image nodes#14130

Merged
alexisrolland merged 3 commits into
masterfrom
feat/api-nodes/Krea2-Image
May 27, 2026
Merged

[Partner Nodes] feat: add Krea2 Image nodes#14130
alexisrolland merged 3 commits into
masterfrom
feat/api-nodes/Krea2-Image

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 commented May 27, 2026

New node for the Medium and Large endpoints: https://docs.krea.ai/api-reference/image/krea-2-medium

API Node PR Checklist

Scope

  • Is API Node Change

Pricing & Billing

  • Need pricing update
  • No pricing update

If Need pricing update:

  • Metronome rate cards updated
  • Auto‑billing tests updated and passing

QA

  • QA done
  • QA not required

Comms

  • Informed Kosinkadink

Signed-off-by: bigcat88 <bigcat88@icloud.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new Krea 2 image-generation module for ComfyAPI. The changes introduce two nodes: Krea2ImageNode for submitting prompts and polling generation results, and Krea2StyleReferenceNode for building chains of style references with automatic image upload to Krea's asset storage. The module includes shared constants, a multipart image upload helper, dynamic model configuration, moodboard validation, optional style-reference composition with a maximum chain length of 10, and extension registration via comfy_entrypoint().

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding Krea2 Image nodes as partner nodes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description clearly relates to the changeset, referencing the Krea-2 Image API nodes being added and including necessary checklists for API node PRs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@comfy_api_nodes/nodes_krea.py`:
- Line 175: The prompt is currently validated with validate_string(prompt,
strip_whitespace=False, min_length=1) which accepts whitespace-only input;
update the logic to reject such prompts by trimming before validation or
enabling stripping—e.g., call prompt = prompt.strip() before validation or
change to validate_string(prompt, strip_whitespace=True, min_length=1)—so that
whitespace-only prompts are rejected before sending to Krea and downstream API
errors are avoided.
- Around line 190-197: The code assumes each entry in style_reference has "url"
and "strength" and will crash on malformed items; update the builder in
nodes_krea.py (the block that constructs image_style_references and uses
KreaImageStyleReference) to validate each item shape and types before creating
KreaImageStyleReference: ensure each item is a dict, contains "url" and
"strength", "url" is a non-empty string and "strength" can be converted to
float, and if any item fails validation raise a clear ValueError describing the
invalid item index and reason (and keep the existing max-10 check).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4f54f56b-0ca7-49e9-954d-c126b8d67a23

📥 Commits

Reviewing files that changed from the base of the PR and between 2072d3e and da18688.

⛔ Files ignored due to path filters (1)
  • comfy_api_nodes/apis/krea.py is excluded by !comfy_api_nodes/apis/**
📒 Files selected for processing (1)
  • comfy_api_nodes/nodes_krea.py

Comment thread comfy_api_nodes/nodes_krea.py
Comment thread comfy_api_nodes/nodes_krea.py
@alexisrolland alexisrolland merged commit 175e854 into master May 27, 2026
22 checks passed
@bigcat88 bigcat88 deleted the feat/api-nodes/Krea2-Image branch May 28, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants