Closed Shi5013 closed 3 months ago
Hi!
For your first question, how many epochs did you train for? I've noticed that for some datasets, it can take 100, 200 or even more epochs until the noisyness in the images goes away.
For your second question, my apologies for the bug! Can I ask, what fix you made?
Best, Nick
Thank you for your answer! Regarding the first issue, I initially trained for only 30 epochs. I tried again and after training for 200 epochs, the noise in the images almost disappeared. It was my mistake.
Regarding the second issue, I don’t think it’s your mistake. After searching on Google, I found this:
safetensors_issues
Following their suggestion, I changed import safetensors
to from safetensors.torch import load_file, save_file
, and this resolved the issue. I’m not sure why it worked either.
Hi, where exactly did you change import safetensors
to from safetensors.torch import load_file, save_file
? I'd like to post about this potential bug on the README.
Otherwise, I think your issues are resolved so I'll go ahead and close this. Thanks!
The changes were made in the site-packages of the diffusers library within the Anaconda environment, specifically at the location indicated by the error message.
File "/home/user_gou/anaconda3/envs/voxelmorph/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 361, in save_pretrained
safetensors.torch.save_file(
In the import section of this file, change import safetensors
to from safetensors.torch import load_file, save_file
. Additionally, modify the calls to the two functions. Maybe on lines 109 and 361? (I'm not not sure the actually line because I have already modified.)
Ok, thanks so much for the help. I'll add it to the README!
Hello, @nickk124 . Thank you for your exciting work! I ran your code on my own dataset, but the images output in the
./ddim-{dataset}-256-segguided/samples
folder contain a lot of noise. I would greatly appreciate any advice you could offer. Here are the details of my training:By the way, during the first training, I encountered the following error when saving the safetensor file at the 30th epoch:
However, I have since modified the code and re-ran it, and this error no longer occurs.