Skip to content

Inference with sample size >1 fails #83

Open
@VisionaryMind

Description

@VisionaryMind

This would appear to be a repeat of #60, however, deleting the output directly (or clearing it) does not fix the problem. If option --n_sample is set to any number higher than 1, the following error arises:

Traceback (most recent call last):
File "scripts/inference.py", line 133, in
main(args)
File "scripts/inference.py", line 37, in main
generate_inversions(args, generator, latent_codes, is_cars=is_cars)
File "/home/visionarymind/anaconda3/envs/e4e_env/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "scripts/inference.py", line 105, in generate_inversions
imgs, _ = g([latent_codes[i].unsqueeze(0)], input_is_latent=True, randomize_noise=False, return_latents=True)
IndexError: index 1 is out of bounds for dimension 0 with size 1

Deleting the output directory or ensuring there is no pre-existing latents.pt file does not fix the problem. Do you have any idea what the issue could be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions