zhiyuns / AFCM

Official PyTroch implementation of the MICCAI 2023 paper "Alias-Free Co-Modulated Network for Cross-Modality Synthesis and Super-Resolution of MR Images"
11 stars 2 forks source link

Missing attribute in models #2

Closed ZishengHuang closed 9 months ago

ZishengHuang commented 9 months ago

Congrats and thanks for codes.

Issue Description:

I am following the super resolution setting provided.

python train.py --config-file ./configs/adni/stylegan3/sr_5.yml --model stylegan3

Initially, I got the errors below and fixed them by declare their bool values in _models.comodgan_model.py_

AttributeError: 'StyleGAN3Model' object has no attribute 'extra_b' and 'sg'

Now I have:

AttributeError: 'StyleGAN3Model' object has no attribute 'netSG'

In my aspect, the 'netSG' may should be defined in _models.pix2pixmodel.py, as the same as 'netD' and 'netG':

self.netG = define_G(**opt.model.G, gpu_ids=self.gpu_ids)
if self.isTrain:  
       self.netD = define_D(**opt.model.D, gpu_ids=self.gpu_ids)

Could you provide further material to address this problem...? Thanks you again and wish you have a good day.

Astrostellar commented 9 months ago

Thank you for following our work! We notice that the python file models.comodgan_model.py might have some problems, as our previous version used a segmentation model to guide the generation process. Now we have updated the code and fixed the problems. Please feel free to contact us if you have further questions.

ZishengHuang commented 9 months ago

Glad to have your useful response and thanks for your patience!!