primerz commited on
Commit
786556a
·
verified ·
1 Parent(s): f4d10c2

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +15 -15
config.py CHANGED
@@ -27,7 +27,7 @@ LORA_CHOICES = ["RetroArt", "VGA", "LucasArt", "None"]
27
 
28
  # Face detection configuration
29
  FACE_DETECTION_CONFIG = {
30
- "model_name": "antelopev2",
31
  "det_size": (640, 640),
32
  "ctx_id": 0
33
  }
@@ -48,7 +48,7 @@ DEFAULT_PARAMS = {
48
  "strength": 0.50,
49
  "depth_control_scale": 0.75,
50
  "identity_control_scale": 0.85,
51
- "expression_control_scale": 0.6, # <-- NEW
52
  "lora_choice": "RetroArt",
53
  "lora_scale": 1.0,
54
  "identity_preservation": 1.2,
@@ -66,7 +66,7 @@ PRESETS = {
66
  "lora_scale": 0.8,
67
  "depth_control_scale": 0.65,
68
  "identity_control_scale": 0.95,
69
- "expression_control_scale": 0.8, # <-- NEW
70
  "description": "Maximum face preservation - 96-98% similarity (Level 3)"
71
  },
72
  "Premium Portrait": {
@@ -76,7 +76,7 @@ PRESETS = {
76
  "lora_scale": 1.1,
77
  "depth_control_scale": 0.75,
78
  "identity_control_scale": 0.85,
79
- "expression_control_scale": 0.6, # <-- NEW
80
  "description": "Optimized balanced - strong pixel art + excellent face (92-94% similarity)"
81
  },
82
  "Balanced Portrait": {
@@ -86,7 +86,7 @@ PRESETS = {
86
  "lora_scale": 1.0,
87
  "depth_control_scale": 0.75,
88
  "identity_control_scale": 0.85,
89
- "expression_control_scale": 0.6, # <-- NEW
90
  "description": "Good balance between fidelity and style - 90-93% similarity"
91
  },
92
  "Artistic Excellence": {
@@ -96,7 +96,7 @@ PRESETS = {
96
  "lora_scale": 1.2,
97
  "depth_control_scale": 0.78,
98
  "identity_control_scale": 0.75,
99
- "expression_control_scale": 0.45, # <-- NEW
100
  "description": "Creative with strong likeness - 88-91% similarity"
101
  },
102
  "Style Focus": {
@@ -106,7 +106,7 @@ PRESETS = {
106
  "lora_scale": 1.4,
107
  "depth_control_scale": 0.82,
108
  "identity_control_scale": 0.65,
109
- "expression_control_scale": 0.3, # <-- NEW
110
  "description": "Maximum pixel art style - 83-87% similarity"
111
  },
112
  "Subtle Enhancement": {
@@ -116,7 +116,7 @@ PRESETS = {
116
  "lora_scale": 0.75,
117
  "depth_control_scale": 0.60,
118
  "identity_control_scale": 0.98,
119
- "expression_control_scale": 0.85, # <-- NEW
120
  "description": "Minimal transformation, photo-realistic - 97-99% similarity"
121
  }
122
  }
@@ -164,24 +164,24 @@ CAPTION_CONFIG = {
164
 
165
  # Color matching settings
166
  COLOR_MATCH_CONFIG = {
167
- "lab_lightness_blend": 0.15, # 15% adjustment to L channel
168
- "lab_color_blend_preserved": 0.05, # 5% adjustment with saturation preservation
169
- "lab_color_blend_full": 0.20, # 20% adjustment without preservation
170
- "saturation_boost": 1.05, # Minimal saturation boost
171
  "gaussian_blur_kernel": (51, 51),
172
  "gaussian_blur_sigma": 20
173
  }
174
 
175
  # Face mask settings
176
  FACE_MASK_CONFIG = {
177
- "padding": 0.1, # 10% padding around face
178
- "feather": 30 # Blur radius for soft edges
179
  }
180
 
181
  # Model download retry settings
182
  DOWNLOAD_CONFIG = {
183
  "max_retries": 3,
184
- "retry_delay": 2 # seconds
185
  }
186
 
187
  # Age brackets for demographic detection
 
27
 
28
  # Face detection configuration
29
  FACE_DETECTION_CONFIG = {
30
+ "model_name": "pixagram_face_models", # <-- UPDATED from "antelopev2"
31
  "det_size": (640, 640),
32
  "ctx_id": 0
33
  }
 
48
  "strength": 0.50,
49
  "depth_control_scale": 0.75,
50
  "identity_control_scale": 0.85,
51
+ "expression_control_scale": 0.6,
52
  "lora_choice": "RetroArt",
53
  "lora_scale": 1.0,
54
  "identity_preservation": 1.2,
 
66
  "lora_scale": 0.8,
67
  "depth_control_scale": 0.65,
68
  "identity_control_scale": 0.95,
69
+ "expression_control_scale": 0.8,
70
  "description": "Maximum face preservation - 96-98% similarity (Level 3)"
71
  },
72
  "Premium Portrait": {
 
76
  "lora_scale": 1.1,
77
  "depth_control_scale": 0.75,
78
  "identity_control_scale": 0.85,
79
+ "expression_control_scale": 0.6,
80
  "description": "Optimized balanced - strong pixel art + excellent face (92-94% similarity)"
81
  },
82
  "Balanced Portrait": {
 
86
  "lora_scale": 1.0,
87
  "depth_control_scale": 0.75,
88
  "identity_control_scale": 0.85,
89
+ "expression_control_scale": 0.6,
90
  "description": "Good balance between fidelity and style - 90-93% similarity"
91
  },
92
  "Artistic Excellence": {
 
96
  "lora_scale": 1.2,
97
  "depth_control_scale": 0.78,
98
  "identity_control_scale": 0.75,
99
+ "expression_control_scale": 0.45,
100
  "description": "Creative with strong likeness - 88-91% similarity"
101
  },
102
  "Style Focus": {
 
106
  "lora_scale": 1.4,
107
  "depth_control_scale": 0.82,
108
  "identity_control_scale": 0.65,
109
+ "expression_control_scale": 0.3,
110
  "description": "Maximum pixel art style - 83-87% similarity"
111
  },
112
  "Subtle Enhancement": {
 
116
  "lora_scale": 0.75,
117
  "depth_control_scale": 0.60,
118
  "identity_control_scale": 0.98,
119
+ "expression_control_scale": 0.85,
120
  "description": "Minimal transformation, photo-realistic - 97-99% similarity"
121
  }
122
  }
 
164
 
165
  # Color matching settings
166
  COLOR_MATCH_CONFIG = {
167
+ "lab_lightness_blend": 0.15,
168
+ "lab_color_blend_preserved": 0.05,
169
+ "lab_color_blend_full": 0.20,
170
+ "saturation_boost": 1.05,
171
  "gaussian_blur_kernel": (51, 51),
172
  "gaussian_blur_sigma": 20
173
  }
174
 
175
  # Face mask settings
176
  FACE_MASK_CONFIG = {
177
+ "padding": 0.1,
178
+ "feather": 30
179
  }
180
 
181
  # Model download retry settings
182
  DOWNLOAD_CONFIG = {
183
  "max_retries": 3,
184
+ "retry_delay": 2
185
  }
186
 
187
  # Age brackets for demographic detection