fix: prevent inference tensor version counter tracking issue for GroundingDINO
use no_grad and inference_mode on predict_with_caption see https://github.com/lllyasviel/Fooocus/discussions/3213#discussioncomment-10017126
This commit is contained in:
parent
89cb354e8b
commit
efb6ca01d3
|
|
@ -19,6 +19,8 @@ class GroundingDinoModel(Model):
|
|||
self.load_device = torch.device('cpu')
|
||||
self.offload_device = torch.device('cpu')
|
||||
|
||||
@torch.no_grad()
|
||||
@torch.inference_mode()
|
||||
def predict_with_caption(
|
||||
self,
|
||||
image: np.ndarray,
|
||||
|
|
|
|||
Loading…
Reference in New Issue