Skip to content

Remove useless code.#14178

Merged
comfyanonymous merged 1 commit into
masterfrom
comfyanonymous-patch-1
May 29, 2026
Merged

Remove useless code.#14178
comfyanonymous merged 1 commit into
masterfrom
comfyanonymous-patch-1

Conversation

@comfyanonymous
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 75dc8157-cf48-42e6-a4ec-55c24234ef0d

📥 Commits

Reviewing files that changed from the base of the PR and between ec1896a and d83f709.

📒 Files selected for processing (1)
  • comfy/ldm/qwen_image/model.py
💤 Files with no reviewable changes (1)
  • comfy/ldm/qwen_image/model.py

📝 Walkthrough

Walkthrough

This PR removes a module-level helper function apply_rotary_emb(x, freqs_cis) from the Qwen image model implementation. The function deletion eliminates 9 lines of code without affecting any exported APIs or public interfaces. After the removal, QwenTimestepProjEmbeddings immediately follows the FeedForward.forward method definition.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Remove useless code' is vague and generic, failing to specify what code is being removed or why it's considered useless. Provide a more descriptive title that specifies the removed functionality, such as 'Remove unused apply_rotary_emb helper function'.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess the intent and context of the changes. Add a description explaining why the apply_rotary_emb function is no longer needed and confirming it has no external dependencies.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ 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.

@comfyanonymous comfyanonymous merged commit 6e1ef23 into master May 29, 2026
16 checks passed
@comfyanonymous comfyanonymous deleted the comfyanonymous-patch-1 branch May 29, 2026 23:26
@m8rr
Copy link
Copy Markdown

m8rr commented May 30, 2026

This might look like it's breaking NunchakuQwenImage, but... yeah. Nunchaku doesn't seem to get updates these days, and I don't really use it anymore either.

[ERROR] Node `NunchakuQwenImageDiTLoader` import failed:
Traceback (most recent call last):
  File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-nunchaku\__init__.py", line 89, in <module>
    from .nodes.models.qwenimage import NunchakuQwenImageDiTLoader
  File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-nunchaku\nodes\models\qwenimage.py", line 15, in <module>
    from ...model_configs.qwenimage import NunchakuQwenImage
  File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-nunchaku\model_configs\qwenimage.py", line 8, in <module>
    from .. import model_base
  File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-nunchaku\model_base\__init__.py", line 1, in <module>
    from .qwenimage import NunchakuQwenImage
  File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-nunchaku\model_base\qwenimage.py", line 12, in <module>
    from ..models.qwenimage import NunchakuQwenImageTransformer2DModel
  File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-nunchaku\models\qwenimage.py", line 20, in <module>
    from comfy.ldm.qwen_image.model import (
    ...<6 lines>...
    )
ImportError: cannot import name 'apply_rotary_emb' from 'comfy.ldm.qwen_image.model' (D:\AI\ComfyUI_windows_portable\ComfyUI\comfy\ldm\qwen_image\model.py)

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