matthieufp
commited on
Commit
•
2515b82
1
Parent(s):
bb430d5
Update README.md
Browse files
README.md
CHANGED
@@ -47,8 +47,9 @@ from PIL import Image
|
|
47 |
import torch
|
48 |
from zerommt import create_model
|
49 |
|
|
|
50 |
model = create_model(model_path="matthieufp/ZeroMMT-1.3B",
|
51 |
-
enable_cfg=False)
|
52 |
model.eval()
|
53 |
|
54 |
image = Image.open(
|
@@ -102,8 +103,9 @@ from PIL import Image
|
|
102 |
import torch
|
103 |
from zerommt import create_model
|
104 |
|
|
|
105 |
model = create_model(model_path="matthieufp/ZeroMMT-1.3B",
|
106 |
-
enable_cfg=True)
|
107 |
model.eval()
|
108 |
|
109 |
image = Image.open(
|
|
|
47 |
import torch
|
48 |
from zerommt import create_model
|
49 |
|
50 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
51 |
model = create_model(model_path="matthieufp/ZeroMMT-1.3B",
|
52 |
+
enable_cfg=False).to(device)
|
53 |
model.eval()
|
54 |
|
55 |
image = Image.open(
|
|
|
103 |
import torch
|
104 |
from zerommt import create_model
|
105 |
|
106 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
107 |
model = create_model(model_path="matthieufp/ZeroMMT-1.3B",
|
108 |
+
enable_cfg=True).to(device)
|
109 |
model.eval()
|
110 |
|
111 |
image = Image.open(
|