rahul7star commited on
Commit
6c2bd76
·
verified ·
1 Parent(s): e65cc57

Update app_lora1.py

Browse files
Files changed (1) hide show
  1. app_lora1.py +4 -3
app_lora1.py CHANGED
@@ -179,9 +179,7 @@ def get_pipeline(script_name):
179
  pipe.transformer = log_pipe_calls(pipe.transformer, "pipe.transformer")
180
  pipe = log_pipe_calls(pipe, "pipe")
181
 
182
- # ZeroGPU-safe
183
- if not hasattr(pipe, "hf_device_map"):
184
- pipe = pipe.to("cuda")
185
 
186
  PIPELINES[script_name] = pipe
187
  log(f"✅ Pipeline ready: {script_name}")
@@ -210,6 +208,9 @@ def generate_image(
210
  raise RuntimeError("Pipeline not registered")
211
 
212
  pipe = get_pipeline(pipeline_name)
 
 
 
213
 
214
  log("=== PIPELINE TECHNOLOGY ===")
215
  log(pipeline_technology_info(pipe))
 
179
  pipe.transformer = log_pipe_calls(pipe.transformer, "pipe.transformer")
180
  pipe = log_pipe_calls(pipe, "pipe")
181
 
182
+
 
 
183
 
184
  PIPELINES[script_name] = pipe
185
  log(f"✅ Pipeline ready: {script_name}")
 
208
  raise RuntimeError("Pipeline not registered")
209
 
210
  pipe = get_pipeline(pipeline_name)
211
+
212
+ if not hasattr(pipe, "hf_device_map"):
213
+ pipe = pipe.to("cuda")
214
 
215
  log("=== PIPELINE TECHNOLOGY ===")
216
  log(pipeline_technology_info(pipe))