Closed whitebeacon closed 11 months ago
The weights you're loading are incorrect for the architecture. You have to configure the Unet parameters so that they match the weights you want to load.
The weights you're loading are incorrect for the architecture. You have to configure the Unet parameters so that they match the weights you want to load.
Hello, I modified images_dir, recons_dir, dire_dir and model_path in the compute_dire.py file and modified these into my own paths, and no other code was changed. After running compute_dire.py, then come out this question, Did you perform any other operations during debugging?How to configure the Unet parameters?
It depends on the model checkpoint. For LSUN-bedroom I am using the lsun_bedroom.pt checkpoint released with the ADM repository. In that repo you can verify what is the needed configuration for each checkpoint.
If you are using compute_dire.sh
you can directly modify the MODEL_FLAGS variable, otherwise you need to insert them into the configuration dictionary accordingly.
For example, this is the configuration for LSUN-Bedroom:
attention_resolutions 32,16,8
class_cond False
diffusion_steps 1000
dropout 0.1
image_size 256
learn_sigma True
noise_schedule linear
num_channels 256
num_head_channels 64
num_res_blocks 2
resblock_updown True
use_fp16 True
use_scale_shift_norm True
It depends on the model checkpoint. For LSUN-bedroom I am using the lsun_bedroom.pt checkpoint released with the ADM repository. In that repo you can verify what is the needed configuration for each checkpoint. If you are using
compute_dire.sh
you can directly modify the MODEL_FLAGS variable, otherwise you need to insert them into the configuration dictionary accordingly. For example, this is the configuration for LSUN-Bedroom:attention_resolutions 32,16,8 class_cond False diffusion_steps 1000 dropout 0.1 image_size 256 learn_sigma True noise_schedule linear num_channels 256 num_head_channels 64 num_res_blocks 2 resblock_updown True use_fp16 True use_scale_shift_norm True
Your answer is very helpful for a novice in artificial intelligence. Thank you very much.
It depends on the model checkpoint. For LSUN-bedroom I am using the lsun_bedroom.pt checkpoint released with the ADM repository. In that repo you can verify what is the needed configuration for each checkpoint. If you are using
compute_dire.sh
you can directly modify the MODEL_FLAGS variable, otherwise you need to insert them into the configuration dictionary accordingly. For example, this is the configuration for LSUN-Bedroom:attention_resolutions 32,16,8 class_cond False diffusion_steps 1000 dropout 0.1 image_size 256 learn_sigma True noise_schedule linear num_channels 256 num_head_channels 64 num_res_blocks 2 resblock_updown True use_fp16 True use_scale_shift_norm True
hi,sorry to bother you,I changed the parameters according to the given configuration and added images to the folder indicated by 'images_ dir',but no images have been generated in the folder indicated by 'recons_dir' and 'dire_dir'. Why is this? ![Uploading 1700215702775.png…]()
Oh,I forget to modify the parameter 'num_samples'.After I changed 'num_samples' to the number of my images in that folder, this program can't be stopped.Why is it?
Does any body know how to solve this problem?