Skip to content

Update language options in nodes_ace.py#12578

Open
iChristGit wants to merge 4 commits intoComfy-Org:masterfrom
iChristGit:master
Open

Update language options in nodes_ace.py#12578
iChristGit wants to merge 4 commits intoComfy-Org:masterfrom
iChristGit:master

Conversation

@iChristGit
Copy link
Copy Markdown

Modified it to include all 51 language options ace-step1.5 supports instead of the original 23 comfyui had.

Modified it to include all 51 language options ace-step1.5 supports instead of the original 23 comfyui had.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 22, 2026

📝 Walkthrough

Walkthrough

The PR updates the language input options in TextEncodeAceStepAudio15 (file comfy_extras/nodes_ace.py), replacing the previous limited list with a much larger set of ISO language codes plus an "unknown" entry. The change affects only the allowed selections for that combo input; no other inputs, outputs, logic, or execution flow were modified.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating language options in nodes_ace.py to expand from 23 to 51 supported languages.
Description check ✅ Passed The description is directly related to the changeset, clearly stating that language options were expanded from 23 to 51 in the ace-step1.5 support.

✏️ 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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@comfy_extras/nodes_ace.py`:
- Line 45: The language Combo input io.Combo.Input("language", options=[...])
currently has no default so the UI selects the first option ('ar'); add an
explicit default parameter (e.g., default='en' or default='unknown') to the
io.Combo.Input call to set a sensible initial selection for users and avoid 'ar'
being implicitly chosen.

Comment thread comfy_extras/nodes_ace.py Outdated
io.Float.Input("duration", default=120.0, min=0.0, max=2000.0, step=0.1),
io.Combo.Input("timesignature", options=['2', '3', '4', '6']),
io.Combo.Input("language", options=["en", "ja", "zh", "es", "de", "fr", "pt", "ru", "it", "nl", "pl", "tr", "vi", "cs", "fa", "id", "ko", "uk", "hu", "ar", "sv", "ro", "el"]),
io.Combo.Input("language", options=['ar', 'az', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'he', 'hi', 'hr', 'ht', 'hu', 'id', 'is', 'it', 'ja', 'ko', 'la', 'lt', 'ms', 'ne', 'nl', 'no', 'pa', 'pl', 'pt', 'ro', 'ru', 'sa', 'sk', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tl', 'tr', 'uk', 'ur', 'vi', 'yue', 'zh', 'unknown']),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Consider adding an explicit default to avoid 'ar' becoming the implicit first-pick.

No default= is specified on the language combo, so the UI will fall back to the first list element — 'ar' (Arabic). For a music-generation tool, 'en' or 'unknown' is likely a more practical starting point for most users.

💡 Suggested fix
-                io.Combo.Input("language", options=['ar', 'az', 'bg', ..., 'unknown']),
+                io.Combo.Input("language", options=['ar', 'az', 'bg', ..., 'unknown'], default='unknown'),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@comfy_extras/nodes_ace.py` at line 45, The language Combo input
io.Combo.Input("language", options=[...]) currently has no default so the UI
selects the first option ('ar'); add an explicit default parameter (e.g.,
default='en' or default='unknown') to the io.Combo.Input call to set a sensible
initial selection for users and avoid 'ar' being implicitly chosen.

@comfyanonymous
Copy link
Copy Markdown
Member

The languages were ordered by popularity, I want the default to be 'en' not 'ar'

changed order of the languages to be ordered by popularity

en is default 
unknown is last
@iChristGit
Copy link
Copy Markdown
Author

List of languages has been re-arranged by popularity

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.

♻️ Duplicate comments (1)
comfy_extras/nodes_ace.py (1)

45-45: LGTM — 'en' is now the implicit default, resolving the previous concern.

The expanded list (51 entries, popularity-ordered, 'unknown' last) looks correct and consistent with the node's existing combo-input pattern. No breaking changes: every language from the old list is still present, and 'en' is now the first element, so it becomes the implicit default as requested.

One optional hardening step: add an explicit default='en' so the intended default is unambiguously declared and immune to future list reorderings.

💡 Optional hardening
-                io.Combo.Input("language", options=['en', 'zh', 'es', ...]),
+                io.Combo.Input("language", options=['en', 'zh', 'es', ...], default='en'),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@comfy_extras/nodes_ace.py` at line 45, The combo input for language currently
relies on list order to make 'en' the implicit default; explicitly set the
default to avoid breakage if the options list is reordered by adding a
default='en' argument to the io.Combo.Input call (the invocation
io.Combo.Input("language", options=[...]) should include default='en') so the
node's intended default is unambiguous and resilient to future changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@comfy_extras/nodes_ace.py`:
- Line 45: The combo input for language currently relies on list order to make
'en' the implicit default; explicitly set the default to avoid breakage if the
options list is reordered by adding a default='en' argument to the
io.Combo.Input call (the invocation io.Combo.Input("language", options=[...])
should include default='en') so the node's intended default is unambiguous and
resilient to future changes.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eec20e3 and caf67e1.

📒 Files selected for processing (1)
  • comfy_extras/nodes_ace.py

@comfy-pr-bot
Copy link
Copy Markdown
Member

Test Evidence Check

⚠️ Warning: Test Explanation Missing

If this PR modifies behavior that requires testing, a test explanation is required. PRs lacking applicable test explanations may not be reviewed until added. Please add test explanations to ensure code quality and prevent regressions.

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.

You can add it by:

  • GitHub: Drag & drop media directly into the PR description
  • YouTube: Include a link to a short demo

@iChristGit
Copy link
Copy Markdown
Author

@comfyanonymous
Hey is there a chance this gets merged, I need to edit the nodes_ace.py file each time I update comfyui because my language is supported but not in the drop-down currently.

The only changes were adding all the available language codes from Ace-step1.5, sorted by popularity.

🙏

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