linoyts HF Staff commited on
Commit
80694a8
·
verified ·
1 Parent(s): 5a1dc49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -149,8 +149,11 @@ def use_output_as_input(output_image):
149
  return gr.update()
150
 
151
  # Initialize Qwen Image Edit pipeline
152
- # Scheduler configuration for Lightning
153
  dtype = torch.bfloat16
 
 
 
154
  scheduler_config = {
155
  "base_image_seq_len": 256,
156
  "base_shift": math.log(3),
 
149
  return gr.update()
150
 
151
  # Initialize Qwen Image Edit pipeline
152
+ # --- Model Loading ---
153
  dtype = torch.bfloat16
154
+ device = "cuda" if torch.cuda.is_available() else "cpu"
155
+
156
+ # Scheduler configuration for Lightning
157
  scheduler_config = {
158
  "base_image_seq_len": 256,
159
  "base_shift": math.log(3),