Instructions to use aiorscam/pgc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aiorscam/pgc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="aiorscam/pgc") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("aiorscam/pgc", dtype="auto") - Notebooks
- Google Colab
- Kaggle
AiorScam PGC Deployment Mirror
This repository mirrors the assets needed by the aiorscam/pgc-inference
dedicated endpoint implementation.
Sources
- PGC source repository: https://github.com/xiaoyu6868/PGC
- PGC upstream commit used for parity review:
e049d1ed97cc0ed066b61d445a7cced216bf550c - PGC checkpoints source: https://modelscope.cn/models/xiaoyuzhou68/PGC_ckpt
- DINOv2 backbone source: https://huggingface.co/facebook/dinov2-large
Layout
checkpoints/
PGC_train_sdv1_4_ckpt.pth
PGC_train_progan_ckpt.pth
PGC_train_progan_sdv1_4_ckpt.pth
dinov2-large/
config.json
model.safetensors
preprocessor_config.json
Endpoint Configuration
The default endpoint variant is the joint PGC checkpoint:
PGC_VARIANT=progan_sdv1_4
PGC_CHECKPOINT_DIR=/repository/checkpoints
PGC_DINO_PRETRAINED_ROOT=/repository
PGC_FAKE_THRESHOLD=0.5
PGC_REAL_THRESHOLD=0.5
Supported variants are sdv1_4, progan, and progan_sdv1_4.
Notes
PGC is a promptless binary real/synthetic image detector. The deployed endpoint does not send or synthesize text prompts; parity with the author implementation comes from the DINOv2 preprocessing path, checkpoint selection, and binary decision threshold.