Leteint commited on
Commit
49d97a3
·
verified ·
1 Parent(s): d096019

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -23,6 +23,8 @@ LORA_FACE_ADAPTER = "face_detail"
23
  LORA_SEXY_REPO = "ntc-ai/SDXL-LoRA-slider.sexy"
24
  LORA_SEXY_ADAPTER ="sexy"
25
 
 
 
26
 
27
 
28
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
@@ -57,6 +59,9 @@ pipe.load_lora_weights(LORA_FACE_REPO, adapter_name=LORA_FACE_ADAPTER)
57
 
58
  pipe.load_lora_weights(LORA_SEXY_REPO, adapter_name=LORA_SEXY_ADAPTER)
59
 
 
 
 
60
  os.makedirs("outputs", exist_ok=True)
61
 
62
 
@@ -94,20 +99,20 @@ def generate(
94
 
95
  # Prompt principal (on enrobe pour aider SDXL)
96
  final_prompt = (
97
- "masterpiece, best quality, highly detailed, "
98
  + (prompt or "1girl, detailed face, realistic skin")
99
  + ", sharp focus"
100
  )
101
 
102
- # Negative : "wrong" est la clé pour sdxl-wrong-lora [web:183][web:194]
103
  if negative and negative.strip():
104
  final_negative = "wrong, " + negative.strip()
105
  else:
106
  final_negative = "wrong, blurry, low quality, deformed, bad anatomy, extra limbs"
107
 
108
  # On combine les deux LoRA : WRONG à 1.0, face en slider
109
- adapters = [LORA_WRONG_ADAPTER, LORA_FACE_ADAPTER, LORA_SEXY_ADAPTER]
110
- weights = [1.0, float(face_weight), 2.0]
111
  pipe.set_adapters(adapters, adapter_weights=weights)
112
 
113
  try:
 
23
  LORA_SEXY_REPO = "ntc-ai/SDXL-LoRA-slider.sexy"
24
  LORA_SEXY_ADAPTER ="sexy"
25
 
26
+ LORA_DETAILLED_REPO = "ntc-ai/SDXL-LoRA-slider.extremely-detailed"
27
+ LORA_DETAILLED_ADAPTER = "extremely detailed"
28
 
29
 
30
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
 
59
 
60
  pipe.load_lora_weights(LORA_SEXY_REPO, adapter_name=LORA_SEXY_ADAPTER)
61
 
62
+ pipe.load_lora_weights(LORA_DETAILLED_REPO, adapter_name=LORA_DETAILLED_ADAPTER)
63
+
64
+
65
  os.makedirs("outputs", exist_ok=True)
66
 
67
 
 
99
 
100
  # Prompt principal (on enrobe pour aider SDXL)
101
  final_prompt = (
102
+ "masterpiece, best quality, extremely detailed, "
103
  + (prompt or "1girl, detailed face, realistic skin")
104
  + ", sharp focus"
105
  )
106
 
107
+ # Negative : "wrong" est la clé pour sdxl-wrong-lora
108
  if negative and negative.strip():
109
  final_negative = "wrong, " + negative.strip()
110
  else:
111
  final_negative = "wrong, blurry, low quality, deformed, bad anatomy, extra limbs"
112
 
113
  # On combine les deux LoRA : WRONG à 1.0, face en slider
114
+ adapters = [LORA_WRONG_ADAPTER, LORA_FACE_ADAPTER, LORA_SEXY_ADAPTER, LORA_DETAILLED_ADAPTER]
115
+ weights = [1.0, float(face_weight), 2.0, 2.0]
116
  pipe.set_adapters(adapters, adapter_weights=weights)
117
 
118
  try: