SIGMitch commited on
Commit
769e874
·
verified ·
1 Parent(s): ec9e556

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -31,8 +31,8 @@ def remove_background(image: Image.Image, threshold: int = 50) -> Image.Image:
31
  return image
32
 
33
 
34
- pipe = FluxInpaintPipeline.from_pretrained(
35
- "black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
36
  pipe2 = FluxImg2ImgPipeline.from_pretrained(
37
  "black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
38
 
@@ -106,19 +106,19 @@ def process(
106
 
107
  resized_mask = mask.resize((width, height), Image.LANCZOS)
108
 
109
- pipe.load_lora_weights("SIGMitch/KIT")
110
- result = pipe(
111
- prompt=input_text,
112
- image=resized_image,
113
- mask_image=resized_mask,
114
- width=width,
115
- height=height,
116
- strength=strength_slider,
117
- generator=generator,
118
- joint_attention_kwargs={"scale": 1.2},
119
- num_inference_steps=num_inference_steps_slider
120
- ).images[0]
121
- print('INFERENCE DONE')
122
  return result, resized_mask
123
 
124
 
 
31
  return image
32
 
33
 
34
+ #pipe = FluxInpaintPipeline.from_pretrained(
35
+ # "black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
36
  pipe2 = FluxImg2ImgPipeline.from_pretrained(
37
  "black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
38
 
 
106
 
107
  resized_mask = mask.resize((width, height), Image.LANCZOS)
108
 
109
+ #pipe.load_lora_weights("SIGMitch/KIT")
110
+ #result = pipe(
111
+ # prompt=input_text,
112
+ # image=resized_image,
113
+ # mask_image=resized_mask,
114
+ # width=width,
115
+ # height=height,
116
+ # strength=strength_slider,
117
+ # generator=generator,
118
+ # joint_attention_kwargs={"scale": 1.2},
119
+ # num_inference_steps=num_inference_steps_slider
120
+ #).images[0]
121
+ #print('INFERENCE DONE')
122
  return result, resized_mask
123
 
124