Skip to content

Some cast/dtype fixes for the birefnet and dino3 models.#14217

Merged
comfyanonymous merged 2 commits into
masterfrom
temp_pr
Jun 1, 2026
Merged

Some cast/dtype fixes for the birefnet and dino3 models.#14217
comfyanonymous merged 2 commits into
masterfrom
temp_pr

Conversation

@comfyanonymous

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

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: a0090b3f-4574-47b1-a29b-2342e949844e

📥 Commits

Reviewing files that changed from the base of the PR and between fb8d936 and 53b5a77.

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

📝 Walkthrough

Walkthrough

This PR removes explicit dtype casts for DINOv3 image inputs: DINOv3ViTEmbeddings and DINOv3ViTModel no longer coerce pixel_values to the patch conv weight dtype, and ClipVisionModel.init no longer overrides dtype to bfloat16 for DINOv3. Separately, WindowAttention.forward in BiRefNet now casts the permuted relative positional bias with comfy.ops.cast_to_input before adding it to attention logits.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the purpose and context of the dtype/casting fixes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: dtype/casting fixes across birefnet and dino3 models.
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 e785f0d into master Jun 1, 2026
16 checks passed
@comfyanonymous comfyanonymous deleted the temp_pr branch June 1, 2026 21:35
zhangp365 pushed a commit to zhangp365/ComfyUI that referenced this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants