Spaces:
Runtime error
Runtime error
Update generator.py
Browse files- generator.py +5 -7
generator.py
CHANGED
|
@@ -346,16 +346,14 @@ class RetroArtConverter:
|
|
| 346 |
print(f"[FACE] Face detection failed: {str(e)[:100]}")
|
| 347 |
raise ValueError(f"No face found in image. Only face images work. Error: {str(e)}")
|
| 348 |
|
| 349 |
-
#
|
| 350 |
if self.models_loaded['lora']:
|
| 351 |
try:
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
else:
|
| 356 |
-
print(f"[LORA] Warning: set_adapters not available")
|
| 357 |
except Exception as e:
|
| 358 |
-
print(f"[LORA] Could not
|
| 359 |
|
| 360 |
# â•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Â
|
| 361 |
# PIPELINE CONFIGURATION
|
|
|
|
| 346 |
print(f"[FACE] Face detection failed: {str(e)[:100]}")
|
| 347 |
raise ValueError(f"No face found in image. Only face images work. Error: {str(e)}")
|
| 348 |
|
| 349 |
+
# Fuse LORA with scale (following working example approach)
|
| 350 |
if self.models_loaded['lora']:
|
| 351 |
try:
|
| 352 |
+
from models import fuse_lora_with_scale
|
| 353 |
+
fuse_lora_with_scale(self.pipe, lora_scale)
|
| 354 |
+
print(f"[LORA] Fused with scale: {lora_scale}")
|
|
|
|
|
|
|
| 355 |
except Exception as e:
|
| 356 |
+
print(f"[LORA] Could not fuse: {e}")
|
| 357 |
|
| 358 |
# â•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Ââ•Â
|
| 359 |
# PIPELINE CONFIGURATION
|