fix: regression in text generate with LTXAV model#13170
fix: regression in text generate with LTXAV model#13170comfyanonymous merged 13 commits intoComfy-Org:masterfrom
Conversation
📝 WalkthroughWalkthroughThis change adds a 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/text_encoders/lt.py`:
- Around line 192-193: The generate method in comfy/text_encoders/lt.py should
provide a default for presence_penalty to preserve backward compatibility;
update the generate signature (function name: generate) to set
presence_penalty=0.0 and keep the internal call to
self.gemma3_12b.generate(tokens["gemma3_12b"], do_sample, max_length,
temperature, top_k, top_p, min_p, repetition_penalty, seed, presence_penalty)
unchanged so callers that omit presence_penalty continue to work.
- Around line 94-98: The generate method signature in class/function generate
currently adds presence_penalty without a default causing callers to break;
update the signature to add a default (presence_penalty=0.0) so it matches
sibling implementations (e.g., llama.py and sd.py) and maintain backward
compatibility, leaving the internal usage of presence_penalty unchanged in the
call to self.transformer.generate.
🪄 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: 248df038-1ee1-4bb7-abb9-fb69362fd3aa
📒 Files selected for processing (1)
comfy/text_encoders/lt.py
Somehow missed the
presence_penaltyin the LTXAV text model specifically.