rahul7star commited on
Commit
ef72076
·
verified ·
1 Parent(s): da8b3da

Update app_lora1.py

Browse files
Files changed (1) hide show
  1. app_lora1.py +6 -1
app_lora1.py CHANGED
@@ -150,7 +150,12 @@ def generate_image(
150
 
151
 
152
 
153
- pipe = pipe.to("cuda")
 
 
 
 
 
154
 
155
 
156
  log("=== NEW GENERATION REQUEST ===")
 
150
 
151
 
152
 
153
+
154
+
155
+ # ✅ Correct, universal, ZeroGPU-safe
156
+ if not hasattr(pipe, "hf_device_map"):
157
+ pipe = pipe.to("cuda")
158
+
159
 
160
 
161
  log("=== NEW GENERATION REQUEST ===")