Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,6 @@ import io
|
|
| 9 |
|
| 10 |
app = FastAPI()
|
| 11 |
|
| 12 |
-
# تحميل LoRA
|
| 13 |
LORA_PATH = hf_hub_download(
|
| 14 |
repo_id="ebraam1/interior-sd-models",
|
| 15 |
filename="Interior_lora.safetensors"
|
|
@@ -26,11 +25,11 @@ pipe = StableDiffusionPipeline.from_pretrained(
|
|
| 26 |
pipe.enable_attention_slicing()
|
| 27 |
pipe.enable_vae_slicing()
|
| 28 |
|
| 29 |
-
print("Loading
|
| 30 |
|
| 31 |
-
# 🔥 الطريقة الصح
|
| 32 |
-
pipe.load_lora_weights(LORA_PATH
|
| 33 |
-
pipe.
|
| 34 |
|
| 35 |
print("Model ready 🔥")
|
| 36 |
|
|
|
|
| 9 |
|
| 10 |
app = FastAPI()
|
| 11 |
|
|
|
|
| 12 |
LORA_PATH = hf_hub_download(
|
| 13 |
repo_id="ebraam1/interior-sd-models",
|
| 14 |
filename="Interior_lora.safetensors"
|
|
|
|
| 25 |
pipe.enable_attention_slicing()
|
| 26 |
pipe.enable_vae_slicing()
|
| 27 |
|
| 28 |
+
print("Loading LoRA (kohya format)...")
|
| 29 |
|
| 30 |
+
# 🔥 الطريقة الصح للـ LoRA بتاعك
|
| 31 |
+
pipe.load_lora_weights(LORA_PATH)
|
| 32 |
+
pipe.fuse_lora(lora_scale=0.8)
|
| 33 |
|
| 34 |
print("Model ready 🔥")
|
| 35 |
|