mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
cleanup: Lama
This commit is contained in:
parent
f45ea1145d
commit
fa3fcd7820
@ -1,5 +1,4 @@
|
||||
import gc
|
||||
import pathlib
|
||||
from typing import Any
|
||||
|
||||
import numpy as np
|
||||
@ -44,6 +43,7 @@ class LaMA:
|
||||
image = torch.from_numpy(image).unsqueeze(0).to(device)
|
||||
mask = torch.from_numpy(mask).unsqueeze(0).to(device)
|
||||
|
||||
with torch.inference_mode():
|
||||
infilled_image = model(image, mask)
|
||||
|
||||
infilled_image = infilled_image[0].permute(1, 2, 0).detach().cpu().numpy()
|
||||
|
Loading…
Reference in New Issue
Block a user