andreas128 / RePaint

Official PyTorch Code and Models of "RePaint: Inpainting using Denoising Diffusion Probabilistic Models", CVPR 2022
1.94k stars 157 forks source link

IndexError | Linux | face_example #9

Open Justuser3310 opened 2 years ago

Justuser3310 commented 2 years ago

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.

andreas128 commented 2 years ago

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?

Justuser3310 commented 2 years ago

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?