YOLOE: Fix model text embedding fusing (#21277)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Jing Qiu <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Laughing-q <1185102784@qq.com>
This commit is contained in:
parent
1b385a1251
commit
0f5d2bb273
@ -249,6 +249,8 @@ class BaseModel(torch.nn.Module):
|
||||
m.forward = m.forward_fuse
|
||||
if isinstance(m, v10Detect):
|
||||
m.fuse() # remove one2many head
|
||||
if isinstance(m, YOLOEDetect) and hasattr(self, "pe"):
|
||||
m.fuse(self.pe.to(next(self.model.parameters()).device))
|
||||
self.info(verbose=verbose)
|
||||
|
||||
return self
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user