Spaces:
Running
on
Zero
Running
on
Zero
lzyhha
commited on
Commit
·
808cfcf
1
Parent(s):
0c52494
space
Browse files
app.py
CHANGED
@@ -315,7 +315,6 @@ def create_demo(model):
|
|
315 |
seed, cfg, steps, upsampling_steps, upsampling_noise, layout_text, task_text, content_text = inputs[-8:]
|
316 |
|
317 |
results = generate(
|
318 |
-
model,
|
319 |
images,
|
320 |
[layout_text, task_text, content_text],
|
321 |
seed=seed, cfg=cfg, steps=steps,
|
@@ -462,8 +461,20 @@ def create_demo(model):
|
|
462 |
|
463 |
|
464 |
@spaces.GPU
|
465 |
-
def generate(
|
466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
|
468 |
def parse_args():
|
469 |
parser = argparse.ArgumentParser()
|
|
|
315 |
seed, cfg, steps, upsampling_steps, upsampling_noise, layout_text, task_text, content_text = inputs[-8:]
|
316 |
|
317 |
results = generate(
|
|
|
318 |
images,
|
319 |
[layout_text, task_text, content_text],
|
320 |
seed=seed, cfg=cfg, steps=steps,
|
|
|
461 |
|
462 |
|
463 |
@spaces.GPU
|
464 |
+
def generate(
|
465 |
+
images,
|
466 |
+
prompts,
|
467 |
+
seed, cfg, steps,
|
468 |
+
upsampling_steps, upsampling_noise):
|
469 |
+
return model.process_images(
|
470 |
+
images=images,
|
471 |
+
prompts=prompts,
|
472 |
+
seed=seed,
|
473 |
+
cfg=cfg,
|
474 |
+
steps=steps,
|
475 |
+
upsampling_steps=upsampling_steps,
|
476 |
+
upsampling_noise=upsampling_noise)
|
477 |
+
|
478 |
|
479 |
def parse_args():
|
480 |
parser = argparse.ArgumentParser()
|