Generalizable Synthetic Image Detection via Language-guided Contrastive Learning