""" Pixagram Pixel Art Generator - Configuration With Commercial FaceID Support License: All FaceID components use commercially-permissive licenses: - OpenCV: BSD License - AuraFace: Commercial OK (fal.ai) - Custom modules: Your proprietary IP """ import torch class Config: # ============================================================ # HARDWARE CONFIGURATION # ============================================================ DEVICE = "cuda" if torch.cuda.is_available() else "cpu" DTYPE = torch.float16 if DEVICE == "cuda" else torch.float32 # ============================================================ # BASE MODEL & LORA (from primerz/pixagram) # ============================================================ REPO_ID = "primerz/pixagram" CHECKPOINT_FILENAME = "horizon.safetensors" LORA_FILENAME = "retroart.safetensors" LORA_STRENGTH = 1.0 # Fixed strength for fusion # Trigger Words for the LoRA STYLE_TRIGGER1 = "HD detailed pixel art artwork and high quality detailed art illustration in retroart style" STYLE_TRIGGER2 = "artwork, illustration, pixel art, retro game art portrait, art." # Default Negative Prompt DEFAULT_NEGATIVE_PROMPT = "Ugly, artifacts, blurry, disformed, photo-realistic, photo, photography, realistic, low-quality, text, white edges, white border, pixel art, squares, crisp-edge, squared." # ============================================================ # CONTROLNET CONFIGURATION # ============================================================ CN_ZOE_REPO = "diffusers/controlnet-zoe-depth-sdxl-1.0" # Preprocessor (Annotator) Repo ANNOTATOR_REPO = "lllyasviel/Annotators" # ============================================================ # CAPTIONING MODEL # ============================================================ CAPTIONER_REPO = "Salesforce/blip-image-captioning-base" # ============================================================ # FACEID CONFIGURATION (Commercial-Friendly) # ============================================================ # AuraFace model for face encoding (Commercial OK) # AuraFace is a commercially-licensed ArcFace alternative by fal.ai # Produces 512-dim face embeddings via ONNX (fast CPU inference) AURAFACE_REPO = "fal/AuraFace-v1" # Face detection settings FACE_DETECTION_CONFIDENCE = 0.5 FACE_DETECTION_PADDING = 0.3 # Padding around detected face # FaceID injection settings FACEID_NUM_TOKENS = 16 # Number of cross-attention tokens (more = finer detail) FACEID_EMBED_DIM = 512 # Face embedding dimension FACEID_CROSS_ATTENTION_DIM = 2048 # SDXL cross-attention dimension # Default FaceID strength DEFAULT_FACEID_STRENGTH = 0.85 # Whether to auto-detect and apply FaceID AUTO_FACEID = True # ============================================================ # GENERATION DEFAULTS # ============================================================ CGF_SCALE = 1.2 STEPS_NUMBER = 10 IMG_STRENGTH = 0.65 DEPTH_STRENGTH = 0.75 CLIP_SKIP = 2 print("[OK] Config loaded - Commercial FaceID enabled (AuraFace)")