File size: 1,813 Bytes
1d8c151
fdb19bf
 
 
2a44f07
fdb19bf
 
8ac26c4
29c8100
 
7198947
8ac26c4
fdb19bf
e456dc4
7198947
fdb19bf
8ac26c4
7198947
46b1a94
fdb19bf
 
 
f18b716
8ac26c4
 
a882f77
f18b716
8ac26c4
 
 
 
e456dc4
 
 
 
 
fdb19bf
e456dc4
6ace0ed
8ac26c4
0f75e18
 
8ac26c4
 
 
cd5c205
202af21
8ac26c4
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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