accept arbitrary s

This commit is contained in:
Robin Rombach 2022-04-04 22:44:51 +02:00 committed by GitHub
parent 32c525011b
commit 5820f690bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,7 +118,7 @@ if __name__ == "__main__":
with torch.no_grad(): with torch.no_grad():
with model.ema_scope(): with model.ema_scope():
uc = None uc = None
if opt.scale > 0: if opt.scale != 1.0:
uc = model.get_learned_conditioning(opt.n_samples * [""]) uc = model.get_learned_conditioning(opt.n_samples * [""])
for n in trange(opt.n_iter, desc="Sampling"): for n in trange(opt.n_iter, desc="Sampling"):
c = model.get_learned_conditioning(opt.n_samples * [prompt]) c = model.get_learned_conditioning(opt.n_samples * [prompt])