Spaces:
Sleeping
Sleeping
must implement render_only before actually running.
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import os
|
|
7 |
import torch
|
8 |
import time
|
9 |
|
|
|
10 |
def process_multi_wrapper(rendered_txt_0, rendered_txt_1, rendered_txt_2, rendered_txt_3,
|
11 |
shared_prompt,
|
12 |
width_0, width_1, width_2, width_3,
|
@@ -18,8 +19,10 @@ def process_multi_wrapper(rendered_txt_0, rendered_txt_1, rendered_txt_2, render
|
|
18 |
shared_num_samples, shared_image_resolution,
|
19 |
shared_ddim_steps, shared_guess_mode,
|
20 |
shared_strength, shared_scale, shared_seed,
|
21 |
-
shared_eta, shared_a_prompt, shared_n_prompt
|
22 |
-
|
|
|
|
|
23 |
rendered_txt_values = [rendered_txt_0, rendered_txt_1, rendered_txt_2, rendered_txt_3]
|
24 |
width_values = [width_0, width_1, width_2, width_3]
|
25 |
ratio_values = [ratio_0, ratio_1, ratio_2, ratio_3]
|
@@ -27,7 +30,7 @@ def process_multi_wrapper(rendered_txt_0, rendered_txt_1, rendered_txt_2, render
|
|
27 |
top_left_y_values = [top_left_y_0, top_left_y_1, top_left_y_2, top_left_y_3]
|
28 |
yaw_values = [yaw_0, yaw_1, yaw_2, yaw_3]
|
29 |
num_rows_values = [num_rows_0, num_rows_1, num_rows_2, num_rows_3]
|
30 |
-
|
31 |
return render_tool.process_multi(rendered_txt_values, shared_prompt,
|
32 |
width_values, ratio_values,
|
33 |
top_left_x_values, top_left_y_values,
|
@@ -58,6 +61,7 @@ def process_multi_wrapper_only_show_rendered(rendered_txt_0, rendered_txt_1, ren
|
|
58 |
top_left_y_values = [top_left_y_0, top_left_y_1, top_left_y_2, top_left_y_3]
|
59 |
yaw_values = [yaw_0, yaw_1, yaw_2, yaw_3]
|
60 |
num_rows_values = [num_rows_0, num_rows_1, num_rows_2, num_rows_3]
|
|
|
61 |
|
62 |
return render_tool.process_multi(rendered_txt_values, shared_prompt,
|
63 |
width_values, ratio_values,
|
|
|
7 |
import torch
|
8 |
import time
|
9 |
|
10 |
+
ALLOW_RUN_GENERATION = False
|
11 |
def process_multi_wrapper(rendered_txt_0, rendered_txt_1, rendered_txt_2, rendered_txt_3,
|
12 |
shared_prompt,
|
13 |
width_0, width_1, width_2, width_3,
|
|
|
19 |
shared_num_samples, shared_image_resolution,
|
20 |
shared_ddim_steps, shared_guess_mode,
|
21 |
shared_strength, shared_scale, shared_seed,
|
22 |
+
shared_eta, shared_a_prompt, shared_n_prompt):
|
23 |
+
if not ALLOW_RUN_GENERATION:
|
24 |
+
return
|
25 |
+
|
26 |
rendered_txt_values = [rendered_txt_0, rendered_txt_1, rendered_txt_2, rendered_txt_3]
|
27 |
width_values = [width_0, width_1, width_2, width_3]
|
28 |
ratio_values = [ratio_0, ratio_1, ratio_2, ratio_3]
|
|
|
30 |
top_left_y_values = [top_left_y_0, top_left_y_1, top_left_y_2, top_left_y_3]
|
31 |
yaw_values = [yaw_0, yaw_1, yaw_2, yaw_3]
|
32 |
num_rows_values = [num_rows_0, num_rows_1, num_rows_2, num_rows_3]
|
33 |
+
ALLOW_RUN_GENERATION = False
|
34 |
return render_tool.process_multi(rendered_txt_values, shared_prompt,
|
35 |
width_values, ratio_values,
|
36 |
top_left_x_values, top_left_y_values,
|
|
|
61 |
top_left_y_values = [top_left_y_0, top_left_y_1, top_left_y_2, top_left_y_3]
|
62 |
yaw_values = [yaw_0, yaw_1, yaw_2, yaw_3]
|
63 |
num_rows_values = [num_rows_0, num_rows_1, num_rows_2, num_rows_3]
|
64 |
+
ALLOW_RUN_GENERATION = True
|
65 |
|
66 |
return render_tool.process_multi(rendered_txt_values, shared_prompt,
|
67 |
width_values, ratio_values,
|