Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in FID evaluation #20

Open
Artanic30 opened this issue Jun 14, 2024 · 2 comments
Open

Error in FID evaluation #20

Artanic30 opened this issue Jun 14, 2024 · 2 comments

Comments

@Artanic30
Copy link

Hi, I'm running FID evaluation code by following command

bash scripts/autoregressive/sample_c2i.sh --vq-ckpt ./pretrained_models/vq_ds16_c2i.pt --gpt-ckpt ./pretrained_models/c2i_B.pt --gpt-model GPT-B --image-size 384 --image-size-eval 256 --cfg-scale 2.0

This code will raise following error

torch._dynamo.exc.Unsupported: dynamic shape operator: aten.repeat_interleave.Tensor                                                                                                                                                     
                                                                                                                                                                                                                                         
from user code:                                                                                                                                                                                                                          
   File "/data1/qlt/LlamaGen/autoregressive/models/gpt.py", line 255, in forward                                                                                                                                                         
    h = x + self.drop_path(self.attention(self.attention_norm(x), freqs_cis, start_pos, mask))                                                                                                                                           
  File "/data1/qlt/LlamaGen/autoregressive/models/gpt.py", line 229, in forward                                                                                                                                                          
    keys = keys.repeat_interleave(self.n_head // self.n_kv_head, dim=1) 

I notice this error iscaused by the default args in autoregressive/sample/sample_c2i_ddp.py where torch compile is set to True by default.

       parser.add_argument("--compile", action='store_true', default=True)

The scripts can work by setting this --compile to False. I'm wondering if this is due to my environment or it's a bugs in codes.

@PeizeSun
Copy link
Collaborator

Hi~
Can you reproduce our reported FID performance by setting --compile to False?

@Artanic30
Copy link
Author

Thanks for fast reply. I'm currenting testing reproduced models, maybe I will try it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants