ebraam1 commited on
Commit
89ccfd9
·
verified ·
1 Parent(s): 5aa07d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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 Kohya LoRA correctly...")
30
 
31
- # 🔥 الطريقة الصحيحة للـ Kohya LoRA
32
- pipe.load_lora_weights(LORA_PATH, adapter_name="interior")
33
- pipe.set_adapters("interior", adapter_weights=0.8)
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