NikhilJoson commited on
Commit
ced2fa4
1 Parent(s): 7ff5a45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -236,10 +236,11 @@ def generate_mask(inp_image, label, threshold):
236
 
237
 
238
  #Setting up Flux (Schnell) Inpainting
 
239
  text_encoder_ = CLIPTextModel.from_pretrained("openai/clip-vit-large-patch14", torch_dtype=torch.bfloat16)
240
  text_encoder_2_ = T5EncoderModel.from_pretrained("xlabs-ai/xflux_text_encoders", torch_dtype=torch.bfloat16)
241
 
242
- inpaint_pipe = FluxInpaintPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell",text_encoder=text_encoder_,text_encoder_2=text_encoder_2_, torch_dtype=torch.bfloat16).to(DEVICE)
243
  #inpaint_pipe.load_lora_weights("XLabs-AI/flux-RealismLora")
244
 
245
 
 
236
 
237
 
238
  #Setting up Flux (Schnell) Inpainting
239
+ transformer_ = FluxTransformer2DModel.from_pretrained("ashen0209/Flux-Dev2Pro", torch_dtype=torch.bfloat16)
240
  text_encoder_ = CLIPTextModel.from_pretrained("openai/clip-vit-large-patch14", torch_dtype=torch.bfloat16)
241
  text_encoder_2_ = T5EncoderModel.from_pretrained("xlabs-ai/xflux_text_encoders", torch_dtype=torch.bfloat16)
242
 
243
+ inpaint_pipe = FluxInpaintPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell",transformer=transformer_,text_encoder=text_encoder_,text_encoder_2=text_encoder_2_, torch_dtype=torch.bfloat16).to(DEVICE)
244
  #inpaint_pipe.load_lora_weights("XLabs-AI/flux-RealismLora")
245
 
246