Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ print("downloaded!")
|
|
23 |
from src.flux.xflux_pipeline import XFluxPipeline
|
24 |
|
25 |
@spaces.GPU(duration=200)
|
26 |
-
def process_image(lora_path, lora_name,
|
27 |
def run_xflux_pipeline(
|
28 |
prompt, image, repo_id, name, device,
|
29 |
model_type, width, height, timestep_to_start_cfg, num_steps, true_gs, guidance,
|
@@ -92,7 +92,7 @@ def process_image(lora_path, lora_name, number_of_images, image, prompt, steps,
|
|
92 |
|
93 |
# Laço para gerar imagens
|
94 |
images = []
|
95 |
-
for _ in range(
|
96 |
seed = random.randint(0, 2147483647)
|
97 |
result = xflux_pipeline(
|
98 |
prompt=args.prompt,
|
@@ -130,7 +130,7 @@ def process_image(lora_path, lora_name, number_of_images, image, prompt, steps,
|
|
130 |
height=1024,
|
131 |
timestep_to_start_cfg=cfg,
|
132 |
num_steps=steps,
|
133 |
-
num_images_per_prompt=
|
134 |
use_lora=use_lora,
|
135 |
lora_repo_id=lora_path,
|
136 |
lora_name=lora_name,
|
@@ -168,7 +168,7 @@ with gr.Blocks() as demo:
|
|
168 |
with gr.Column(scale=2, elem_classes="app"):
|
169 |
output = gr.Gallery(label="Galery output", elem_classes="galery")
|
170 |
|
171 |
-
submit_btn.click(process_image, inputs=[lora_path, lora_name,
|
172 |
|
173 |
if __name__ == '__main__':
|
174 |
demo.launch(share=True, debug=True)
|
|
|
23 |
from src.flux.xflux_pipeline import XFluxPipeline
|
24 |
|
25 |
@spaces.GPU(duration=200)
|
26 |
+
def process_image(lora_path, lora_name, image, prompt, steps, use_lora, use_controlnet, use_depth, use_hed, use_ip, lora_weight, negative_image, neg_prompt, true_gs, guidance, cfg):
|
27 |
def run_xflux_pipeline(
|
28 |
prompt, image, repo_id, name, device,
|
29 |
model_type, width, height, timestep_to_start_cfg, num_steps, true_gs, guidance,
|
|
|
92 |
|
93 |
# Laço para gerar imagens
|
94 |
images = []
|
95 |
+
for _ in range(1):
|
96 |
seed = random.randint(0, 2147483647)
|
97 |
result = xflux_pipeline(
|
98 |
prompt=args.prompt,
|
|
|
130 |
height=1024,
|
131 |
timestep_to_start_cfg=cfg,
|
132 |
num_steps=steps,
|
133 |
+
num_images_per_prompt=1,
|
134 |
use_lora=use_lora,
|
135 |
lora_repo_id=lora_path,
|
136 |
lora_name=lora_name,
|
|
|
168 |
with gr.Column(scale=2, elem_classes="app"):
|
169 |
output = gr.Gallery(label="Galery output", elem_classes="galery")
|
170 |
|
171 |
+
submit_btn.click(process_image, inputs=[lora_path, lora_name, input_image, prompt, steps, use_lora, controlnet, use_depth, use_hed, use_ip, lora_weight, negative_image, neg_prompt, true_gs, guidance, cfg], outputs=output)
|
172 |
|
173 |
if __name__ == '__main__':
|
174 |
demo.launch(share=True, debug=True)
|