guided-diffusion icon indicating copy to clipboard operation
guided-diffusion copied to clipboard

enumerate errors

Open Joeyd348039 opened this issue 4 years ago • 1 comments

I seem to keep getting enumerate errors. IndexError: list index out of range

And the code with problems is in this range:

    **for j, sample in enumerate(samples):**
        cur_t -= 1
        if j % 100 == 0 or cur_t == -1:
            print()
            for k, image in enumerate(sample['pred_xstart']):
                filename = f'progress_{i * batch_size + k:1}.png'
                TF.to_pil_image(image.add(1).div(2).clamp(0, 1)).save(filename)
                tqdm.write(f'Batch {i}, step {j}, output {k}:')
                display.display(display.Image(filename))

That first line is usually where the error is highlighted. I'm new to this so is there anywhere I should be looking to see whats wrong?

Joeyd348039 avatar Oct 07 '21 20:10 Joeyd348039

Can you post the entire stack trace / code that you are using to produce this issue?

unixpickle avatar Oct 14 '21 18:10 unixpickle