andreas128 / RePaint

Official PyTorch Code and Models of "RePaint: Inpainting using Denoising Diffusion Probabilistic Models", CVPR 2022

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexError | Linux | face_example

Justuser3310 opened this issue · comments

Hello,
When i finished "setup"(instruction in README.md), i get this error:
[void@linux RePaint]$ prime-run python3 test.py --conf_path confs/face_example.yml
Start face_example
Traceback (most recent call last):
File "/home/void/Downloads/RePaint/test.py", line 180, in
main(conf_arg)
File "/home/void/Downloads/RePaint/test.py", line 66, in main
model, diffusion = create_model_and_diffusion(
File "/home/void/Downloads/RePaint/guided_diffusion/script_util.py", line 135, in create_model_and_diffusion
diffusion = create_gaussian_diffusion(
File "/home/void/Downloads/RePaint/guided_diffusion/script_util.py", line 288, in create_gaussian_diffusion
return SpacedDiffusion(
File "/home/void/Downloads/RePaint/guided_diffusion/respace.py", line 119, in init
super().init(conf=conf, **kwargs)
File "/home/void/Downloads/RePaint/guided_diffusion/gaussian_diffusion.py", line 158, in init
np.append(self.posterior_variance[1], self.posterior_variance[1:])
IndexError: index 1 is out of bounds for axis 0 with size 1

My config file "face_example.yml" as default config exclude diffusion_steps: 200 (because my system kill the process with diffusion_steps: 1000 - I have only 8GB RAM)

I hope for your quick help
Sincerely, Justuser.

----------------SOLUTION-------------------:

Don't change "diffusion_steps: 1000" in parameters.

> Also others parameters maybe cause error.

We describe how to modify the number of steps in the section "How to speed up the inference?" in the README.md.

Does that help? What is the error you get with diffusion_steps: 1000?

Hmm...With your parameter it works!!!

(When all applications closed)

Thank you,but i don't understand what do this parameters:
n_sample: 1
jump_length: 1
jump_n_sample: 1

When changing parameters it doesn't run faster or slower.
For what this?

Also i noticed that this program uses only 1 "Thread" of CPU.
Can i use more threads? And will it faster?