Skip to content

Use ErnieTEModel_ not ErnieTEModel.#13431

Merged
comfyanonymous merged 1 commit intoComfy-Org:masterfrom
bedovyy:fix_ernie_te
Apr 16, 2026
Merged

Use ErnieTEModel_ not ErnieTEModel.#13431
comfyanonymous merged 1 commit intoComfy-Org:masterfrom
bedovyy:fix_ernie_te

Conversation

@bedovyy
Copy link
Copy Markdown
Contributor

@bedovyy bedovyy commented Apr 16, 2026

Minor fix of ErnieTEModel.

Currently TE for ERNIE-Image refers ErnieTEModel and it cause,

  • slow decode
  • MixedPrecision model not working.

It fixes the above things.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

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: 826cbd4d-a729-49d1-ac20-58297cbbc6c0

📥 Commits

Reviewing files that changed from the base of the PR and between e9a2d1e and 1648e35.

📒 Files selected for processing (1)
  • comfy/text_encoders/ernie.py

📝 Walkthrough

Walkthrough

The te() factory function in the ERNIE text encoder module was modified to return a dynamically defined subclass instead of the base class. This subclass applies specific transformations—converting dtype_llama to dtype and injecting llama_quantization_metadata into model_options—before invoking the parent class constructor. The change alters the actual class instance returned by the factory while preserving the external interface. The modification spans a single line addition and deletion.

🚥 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 directly and specifically describes the main change: switching from using ErnieTEModel to ErnieTEModel_ in the ERNIE text encoder implementation.
Description check ✅ Passed The description is clearly related to the changeset, explaining the rationale for the change and the problems it solves (slow decode and MixedPrecision issues).

✏️ 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 b41ab53 into Comfy-Org:master Apr 16, 2026
14 checks passed
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.

2 participants