Update app.py
Browse files
app.py
CHANGED
|
@@ -88,8 +88,8 @@ def process(
|
|
| 88 |
seed_slicer = random.randint(0, MAX_SEED)
|
| 89 |
generator = torch.Generator().manual_seed(seed_slicer)
|
| 90 |
|
| 91 |
-
if not mask:
|
| 92 |
-
|
| 93 |
pipe2.load_lora_weights("SIGMitch/KIT")
|
| 94 |
result = pipe2(
|
| 95 |
prompt=input_text,
|
|
@@ -102,9 +102,9 @@ def process(
|
|
| 102 |
num_inference_steps=num_inference_steps_slider
|
| 103 |
).images[0]
|
| 104 |
print('INFERENCE DONE')
|
| 105 |
-
|
| 106 |
|
| 107 |
-
|
| 108 |
|
| 109 |
#pipe.load_lora_weights("SIGMitch/KIT")
|
| 110 |
#result = pipe(
|
|
@@ -119,7 +119,7 @@ def process(
|
|
| 119 |
# num_inference_steps=num_inference_steps_slider
|
| 120 |
#).images[0]
|
| 121 |
#print('INFERENCE DONE')
|
| 122 |
-
return result, resized_mask
|
| 123 |
|
| 124 |
|
| 125 |
with gr.Blocks() as demo:
|
|
|
|
| 88 |
seed_slicer = random.randint(0, MAX_SEED)
|
| 89 |
generator = torch.Generator().manual_seed(seed_slicer)
|
| 90 |
|
| 91 |
+
# if not mask:
|
| 92 |
+
# gr.Info("Please draw a mask on the image.")
|
| 93 |
pipe2.load_lora_weights("SIGMitch/KIT")
|
| 94 |
result = pipe2(
|
| 95 |
prompt=input_text,
|
|
|
|
| 102 |
num_inference_steps=num_inference_steps_slider
|
| 103 |
).images[0]
|
| 104 |
print('INFERENCE DONE')
|
| 105 |
+
return result, None
|
| 106 |
|
| 107 |
+
#resized_mask = mask.resize((width, height), Image.LANCZOS)
|
| 108 |
|
| 109 |
#pipe.load_lora_weights("SIGMitch/KIT")
|
| 110 |
#result = pipe(
|
|
|
|
| 119 |
# num_inference_steps=num_inference_steps_slider
|
| 120 |
#).images[0]
|
| 121 |
#print('INFERENCE DONE')
|
| 122 |
+
# return result, resized_mask
|
| 123 |
|
| 124 |
|
| 125 |
with gr.Blocks() as demo:
|