prithivMLmods commited on
Commit
affd5b9
·
verified ·
1 Parent(s): 53a533e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -102,8 +102,10 @@ pipe.load_lora_weights("dx8152/Qwen-Image-Edit-2509-Relight",
102
  weight_name="Qwen-Edit-Relight.safetensors",
103
  adapter_name="relight")
104
 
 
105
  pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
106
- MAX_SEED = np.iinfo(np.int32).max
 
107
 
108
  # --- Helper Function for Aspect Ratio (Corrected) ---
109
  @torch.no_grad()
 
102
  weight_name="Qwen-Edit-Relight.safetensors",
103
  adapter_name="relight")
104
 
105
+ pipe.transformer.__class__ = QwenImageTransformer2DModel
106
  pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
107
+
108
+ optimize_pipeline_(pipe, image=[Image.new("RGB", (1024, 1024)), Image.new("RGB", (1024, 1024))], prompt="prompt")
109
 
110
  # --- Helper Function for Aspect Ratio (Corrected) ---
111
  @torch.no_grad()