primerz commited on
Commit
8d98c0c
·
verified ·
1 Parent(s): ff014fd

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +14 -23
config.py CHANGED
@@ -5,30 +5,28 @@ class Config:
5
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
6
  DTYPE = torch.float16 if DEVICE == "cuda" else torch.float32
7
 
8
- # Base Model & Style LoRA
 
 
9
  REPO_ID = "primerz/pixagram"
10
  CHECKPOINT_FILENAME = "reality.safetensors"
11
  LORA_FILENAME = "retroart.safetensors"
12
- LORA_STRENGTH = 1.25
13
 
14
  # Trigger Words for the LoRA
15
  STYLE_TRIGGER = "p1x3l4rt, pixel art"
16
 
17
- # Default Negative Prompt
18
  DEFAULT_NEGATIVE_PROMPT = "Ugly, artifacts, blurry, disformed, photo-realistic, photo, photography, realistic, low-quality, pixelart, text."
 
19
 
20
  # InstantID Assets
21
  INSTANTID_REPO = "InstantX/InstantID"
22
 
23
  # ControlNet Repos
24
- CN_ZOE_REPO = "diffusers/controlnet-zoe-depth-sdxl-1.0"
25
- CN_CANNY_REPO = "diffusers/controlnet-canny-sdxl-1.0"
26
  CN_LINEART_REPO = "ShermanG/ControlNet-Standard-Lineart-for-SDXL"
27
 
28
- # Regular IP-Adapter (for style transfer)
29
- IP_ADAPTER_REPO = "h94/IP-Adapter"
30
- IP_ADAPTER_FILENAME = "ip-adapter_sdxl.bin"
31
-
32
  # Preprocessor (Annotator) Repo
33
  ANNOTATOR_REPO = "lllyasviel/Annotators"
34
 
@@ -37,20 +35,13 @@ class Config:
37
 
38
  # InsightFace Model (HF Hub mirror)
39
  ANTELOPEV2_REPO = "DIAMONIK7777/antelopev2"
40
- ANTELOPEV2_ROOT = "."
41
  ANTELOPEV2_NAME = "antelopev2"
42
 
43
- # TCD Optimized Defaults
44
- CGF_SCALE = 4.0 # Good for TCD + LoRA
45
- STEPS_NUMBER = 8
46
- IMG_STRENGTH = 0.8
 
47
  DEPTH_STRENGTH = 0.8
48
- EDGE_STRENGTH = 0.8
49
-
50
- # Control Type Options
51
- EDGE_TYPES = ["canny", "lineart", "both"] # New: Support multiple edge detection types
52
- DEFAULT_EDGE_TYPE = "canny"
53
-
54
- # IP-Adapter Settings
55
- INSTANTID_SCALE = 0.8 # For face preservation
56
- STYLE_IP_SCALE = 0.5 # For style transfer
 
5
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
6
  DTYPE = torch.float16 if DEVICE == "cuda" else torch.float32
7
 
8
+ # --- UPDATED: New Base Model & Style LoRA ---
9
+ # Assuming these are in the 'primerz/pixagram' repo or a new one.
10
+ # If they are in a different repo, change REPO_ID.
11
  REPO_ID = "primerz/pixagram"
12
  CHECKPOINT_FILENAME = "reality.safetensors"
13
  LORA_FILENAME = "retroart.safetensors"
14
+ LORA_STRENGTH = 1.25 # TCD works well with 1.0
15
 
16
  # Trigger Words for the LoRA
17
  STYLE_TRIGGER = "p1x3l4rt, pixel art"
18
 
19
+ # Default Negative Prompt (Updated for general use)
20
  DEFAULT_NEGATIVE_PROMPT = "Ugly, artifacts, blurry, disformed, photo-realistic, photo, photography, realistic, low-quality, pixelart, text."
21
+ # --- END UPDATED ---
22
 
23
  # InstantID Assets
24
  INSTANTID_REPO = "InstantX/InstantID"
25
 
26
  # ControlNet Repos
27
+ CN_ZOE_REPO = "diffusers/controlnet-zoE-depth-sdxl-1.0"
 
28
  CN_LINEART_REPO = "ShermanG/ControlNet-Standard-Lineart-for-SDXL"
29
 
 
 
 
 
30
  # Preprocessor (Annotator) Repo
31
  ANNOTATOR_REPO = "lllyasviel/Annotators"
32
 
 
35
 
36
  # InsightFace Model (HF Hub mirror)
37
  ANTELOPEV2_REPO = "DIAMONIK7777/antelopev2"
38
+ ANTELOPEV2_ROOT = "." # Parent folder
39
  ANTELOPEV2_NAME = "antelopev2"
40
 
41
+ # Gradio Parameters
42
+ # --- DPMSolver++ works well with standard CFG and more steps ---
43
+ CGF_SCALE = 7.0 # Standard guidance scale
44
+ STEPS_NUMBER = 20 # DPMSolver++ recommended steps
45
+ IMG_STRENGTH = 0.85
46
  DEPTH_STRENGTH = 0.8
47
+ EDGE_STRENGTH = 0.8