NikhilJoson commited on
Commit
1b87c04
1 Parent(s): eeae61c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -236,8 +236,11 @@ def generate_mask(inp_image, label, threshold):
236
 
237
 
238
  #Setting up Flux (Schnell) Inpainting
239
- inpaint_pipe = FluxInpaintPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
240
- inpaint_pipe.load_lora_weights("XLabs-AI/flux-RealismLora")
 
 
 
241
 
242
 
243
  #Uncomment the following 4 lines, if you want LoRA Realism weights added to the pipeline
 
236
 
237
 
238
  #Setting up Flux (Schnell) Inpainting
239
+ text_encoder_ = CLIPTextModel.from_pretrained("openai/clip-vit-large-patch14")
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
 
246
  #Uncomment the following 4 lines, if you want LoRA Realism weights added to the pipeline