Skip to content

Commit 7be6e64

Browse files
committed
2 parents f938922 + d1ef862 commit 7be6e64

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ppl.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ def lerp(a, b, t):
5454
parser.add_argument(
5555
"--crop", action="store_true", help="apply center crop to the images"
5656
)
57+
parser.add_argument(
58+
"--sampling",
59+
default="end",
60+
choices=["end", "full"],
61+
help="set endpoint sampling method",
62+
)
5763
parser.add_argument(
5864
"ckpt", metavar="CHECKPOINT", help="path to the model checkpoints"
5965
)
@@ -83,7 +89,10 @@ def lerp(a, b, t):
8389
noise = g.make_noise()
8490

8591
inputs = torch.randn([batch * 2, latent_dim], device=device)
86-
lerp_t = torch.rand(batch, device=device)
92+
if args.sampling == "full":
93+
lerp_t = torch.rand(batch, device=device)
94+
else:
95+
lerp_t = torch.zeros(batch, device=device)
8796

8897
if args.space == "w":
8998
latent = g.get_latent(inputs)

0 commit comments

Comments
 (0)