sjtuplayer / anomalydiffusion

[AAAI 2024] AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model
MIT License
114 stars 14 forks source link

The size of the chkp you provided and what is actually saved are different. #50

Closed DonghoonPark12 closed 2 months ago

DonghoonPark12 commented 2 months ago

Thanks for your work.

The Checkpoints for anomaly generation model you provided (stored in logs/anomaly-checkpoints) has the following size: image ( embedding.pt: 4.4 MB, spatial_encoder.pt: 1.4 GB)

But, When I run following command which you provide, the model sizes are as follows.

CUDA_VISIBLE_DEVICES=$gpu_id python main.py --spatial_encoder_embedding --data_enhance
 --base configs/latent-diffusion/txt2img-1p4B-finetune-encoder+embedding.yaml -t 
 --actual_resume models/ldm/text2img-large/model.ckpt -n test --gpus 0, 
  --init_word anomaly  --mvtec_path=$path_to_mvtec_dataset

image ( embedding.pt: 1.5 MB, spatial_encoder.pt: 113 MB)

As a result, An error occurs in generate_with_mask.py. image

What did I do wrong? Thanks ahead.