Update app.py
Browse files
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 |
-
|
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 |
-
|
110 |
-
result = pipe(
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
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 |
|