model forward call logic fixes (#495)
Signed-off-by: Divyansh Singhvi <divyanshsinghvi@gmail.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
c9eace8371
commit
df4909630c
2 files changed
+2
-2
No files matched your search
@@ -213,7 +213,7 @@ class GPUGenerationModelRunner(OmniGPUModelRunner):
|
||||
)
|
||||
|
||||
if hasattr(self.model, "forward"):
|
||||
return self.model.forward(**kwargs)
|
||||
return self._model_forward(**kwargs)
|
||||
|
||||
raise RuntimeError(
|
||||
"The loaded model does not expose diffusion interfaces 'sample', "
|
||||
|
||||
@@ -751,7 +751,7 @@ class NPUGenerationModelRunner(OmniNPUModelRunner):
|
||||
)
|
||||
|
||||
if hasattr(self.model, "forward"):
|
||||
return self.model.forward(**kwargs)
|
||||
return self._model_forward(**kwargs)
|
||||
|
||||
raise RuntimeError(
|
||||
"The loaded model does not expose generation interfaces 'sample', "
|
||||
|
||||
Reference in new issue
Block a user