Spaces:
Paused
Paused
Anton Forsman
commited on
Commit
·
36338f6
1
Parent(s):
725f4ba
changed to conditional model
Browse files- inference.py +5 -1
inference.py
CHANGED
@@ -17,9 +17,13 @@ def inference1():
|
|
17 |
return Image.open(io.BytesIO(image))
|
18 |
|
19 |
def inference():
|
20 |
-
model =
|
21 |
image_channels=3,
|
22 |
)
|
|
|
|
|
|
|
|
|
23 |
model.load_state_dict(torch.load("./model_final.pt", map_location=device))
|
24 |
|
25 |
diffusion = GaussianDiffusion(
|
|
|
17 |
return Image.open(io.BytesIO(image))
|
18 |
|
19 |
def inference():
|
20 |
+
model = Unet(
|
21 |
image_channels=3,
|
22 |
)
|
23 |
+
model = ConditionalUnet(
|
24 |
+
unet=model,
|
25 |
+
num_classes=13,
|
26 |
+
)
|
27 |
model.load_state_dict(torch.load("./model_final.pt", map_location=device))
|
28 |
|
29 |
diffusion = GaussianDiffusion(
|