FoundationVision / VAR

[NeurIPS 2024 Oral][GPT beats diffusion🔥] [scaling laws in visual generation📈] Official impl. of "Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction". An *ultra-simple, user-friendly yet state-of-the-art* codebase for autoregressive image generation!
MIT License
4.28k stars 315 forks source link

Inference code keeps generating the same image #61

Closed moeinheidari7829 closed 6 months ago

moeinheidari7829 commented 6 months ago

Dear everyone,

Has anyone had the experience of generating images using "recon_B3HW = var.autoregressive_infer_cfg(B=1, label_B=torch.tensor([label], device=device), cfg=cfg, top_k=900, top_p=0.96, g_seed=seed, more_smooth=more_smooth)"?

When running the code, it keeps producing the same images for each class! I do not know what is causing the problem!

Jvanlo commented 6 months ago

Did you modify the seed?

moeinheidari7829 commented 6 months ago

Yes, I solved it. Thank you very much.