ControlVAR icon indicating copy to clipboard operation
ControlVAR copied to clipboard

Inference failure

Open bigshuimu opened this issue 1 year ago • 4 comments

Hello, your work looks great. I tried to use the pretrained model you provided to generate images, but something went wrong and the images look terrible. How can I load the model correctly? image In addition, I ran train_control_var.py with the following parameters.

    args.batch_size = 8
    args.dataset_name = 'imagenetC'
    args.data_dir = '/opt/data/private/qy/ControlVAR/ImageNet2012'
    args.gpus = 1
    args.output_dir = './output'
    args.multi_cond = True
    args.val_only = True
    args.resume = './pretrained/d30.pth'
    # args.resume = False
    args.lr_scheduler = 'linear'
    args.var_pretrained_path='./pretrained/var_d30.pth'

bigshuimu avatar Dec 10 '24 05:12 bigshuimu

Hi,

Thanks for your interest. It seems like the model is not loaded. Can you post your cmd here? Thanks.

lxa9867 avatar Dec 10 '24 05:12 lxa9867

python3 train_control_var.py --batch_size 8 --dataset_name imagenetC --data_dir ImageNet2012 --gpus 1 --output_dir output --multi_cond True --val_only True --resume pretrained/d30.pth

bigshuimu avatar Dec 10 '24 06:12 bigshuimu

I attempted to add some missing functions and code such as resume, to train_control_var.py, which resolved the model loading issue. 😎Thanks again to the author for their work.❤️ media_images_images_100_c3f48d71af4014bc4cf3

bigshuimu avatar Dec 12 '24 02:12 bigshuimu

I also encountered the same problem about weights. How did you solve it?

zhanghh-031102 avatar Sep 17 '25 12:09 zhanghh-031102