Spaces:
Running
on
Zero
Running
on
Zero
| import torch | |
| class Config: | |
| # Hardware | |
| DEVICE = "cuda" if torch.cuda.is_available() else "cpu" | |
| DTYPE = torch.float16 if DEVICE == "cuda" else torch.float32 | |
| # Base Model & Style LoRA | |
| REPO_ID = "primerz/pixagram" | |
| CHECKPOINT_FILENAME = "reality.safetensors" | |
| LORA_FILENAME = "retroart.safetensors" | |
| LORA_STRENGTH = 1.25 | |
| # Trigger Words for the LoRA | |
| STYLE_TRIGGER = "p1x3l4rt, pixel art" | |
| # Default Negative Prompt | |
| DEFAULT_NEGATIVE_PROMPT = "Ugly, artifacts, blurry, disformed, photo-realistic, photo, photography, realistic, low-quality, pixelart, text." | |
| # InstantID Assets | |
| INSTANTID_REPO = "InstantX/InstantID" | |
| # ControlNet Repos | |
| CN_ZOE_REPO = "diffusers/controlnet-zoe-depth-sdxl-1.0" | |
| CN_CANNY_REPO = "diffusers/controlnet-canny-sdxl-1.0" | |
| CN_LINEART_REPO = "ShermanG/ControlNet-Standard-Lineart-for-SDXL" | |
| # Regular IP-Adapter (for style transfer) | |
| IP_ADAPTER_REPO = "h94/IP-Adapter" | |
| IP_ADAPTER_FILENAME = "ip-adapter_sdxl.bin" | |
| # Preprocessor (Annotator) Repo | |
| ANNOTATOR_REPO = "lllyasviel/Annotators" | |
| # Captioning Model | |
| CAPTIONER_REPO = "Salesforce/blip-image-captioning-base" | |
| # InsightFace Model (HF Hub mirror) | |
| ANTELOPEV2_REPO = "DIAMONIK7777/antelopev2" | |
| ANTELOPEV2_ROOT = "." | |
| ANTELOPEV2_NAME = "antelopev2" | |
| # TCD Optimized Defaults | |
| CGF_SCALE = 4.0 # Good for TCD + LoRA | |
| STEPS_NUMBER = 8 | |
| IMG_STRENGTH = 0.8 | |
| DEPTH_STRENGTH = 0.8 | |
| EDGE_STRENGTH = 0.8 | |
| # Control Type Options | |
| EDGE_TYPES = ["canny", "lineart", "both"] # New: Support multiple edge detection types | |
| DEFAULT_EDGE_TYPE = "canny" | |
| # IP-Adapter Settings | |
| INSTANTID_SCALE = 0.8 # For face preservation | |
| STYLE_IP_SCALE = 0.5 # For style transfer |