Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -426,6 +426,15 @@ def generate_30(
|
|
426 |
expanded = expand_prompt(prompt+caption+caption_2)
|
427 |
expanded_1 = expanded[0]
|
428 |
expanded_2 = expanded[1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
global model
|
430 |
global txt_tokenizer
|
431 |
del model
|
@@ -445,7 +454,6 @@ def generate_30(
|
|
445 |
pil_image_4=sd_image_d,
|
446 |
pil_image_5=sd_image_e,
|
447 |
prompt=prompt+' '+expanded_1,
|
448 |
-
prompt_2=expanded_2,
|
449 |
negative_prompt=negative_prompt,
|
450 |
text_scale=text_scale,
|
451 |
ip_scale=ip_scale,
|
@@ -572,6 +580,15 @@ def generate_60(
|
|
572 |
expanded = expand_prompt(prompt+caption+caption_2)
|
573 |
expanded_1 = expanded[0]
|
574 |
expanded_2 = expanded[1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
global model
|
576 |
global txt_tokenizer
|
577 |
del model
|
@@ -591,7 +608,6 @@ def generate_60(
|
|
591 |
pil_image_4=sd_image_d,
|
592 |
pil_image_5=sd_image_e,
|
593 |
prompt=prompt+' '+expanded_1,
|
594 |
-
prompt_2=expanded_2,
|
595 |
negative_prompt=negative_prompt,
|
596 |
text_scale=text_scale,
|
597 |
ip_scale=ip_scale,
|
@@ -718,6 +734,15 @@ def generate_90(
|
|
718 |
expanded = expand_prompt(prompt+caption+caption_2)
|
719 |
expanded_1 = expanded[0]
|
720 |
expanded_2 = expanded[1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
721 |
global model
|
722 |
global txt_tokenizer
|
723 |
del model
|
@@ -737,7 +762,6 @@ def generate_90(
|
|
737 |
pil_image_4=sd_image_d,
|
738 |
pil_image_5=sd_image_e,
|
739 |
prompt=prompt+' '+expanded_1,
|
740 |
-
prompt_2=expanded_2,
|
741 |
negative_prompt=negative_prompt,
|
742 |
text_scale=text_scale,
|
743 |
ip_scale=ip_scale,
|
|
|
426 |
expanded = expand_prompt(prompt+caption+caption_2)
|
427 |
expanded_1 = expanded[0]
|
428 |
expanded_2 = expanded[1]
|
429 |
+
|
430 |
+
expanded_1 = flatten_and_stringify(expanded_1)
|
431 |
+
expanded_1 = " ".join(expanded_1)
|
432 |
+
expanded_2 = flatten_and_stringify(expanded_2)
|
433 |
+
expanded_2 = " ".join(expanded_2)
|
434 |
+
|
435 |
+
prompt = flatten_and_stringify(prompt+expanded_1+expanded_2)
|
436 |
+
prompt = " ".join(prompt)
|
437 |
+
|
438 |
global model
|
439 |
global txt_tokenizer
|
440 |
del model
|
|
|
454 |
pil_image_4=sd_image_d,
|
455 |
pil_image_5=sd_image_e,
|
456 |
prompt=prompt+' '+expanded_1,
|
|
|
457 |
negative_prompt=negative_prompt,
|
458 |
text_scale=text_scale,
|
459 |
ip_scale=ip_scale,
|
|
|
580 |
expanded = expand_prompt(prompt+caption+caption_2)
|
581 |
expanded_1 = expanded[0]
|
582 |
expanded_2 = expanded[1]
|
583 |
+
|
584 |
+
expanded_1 = flatten_and_stringify(expanded_1)
|
585 |
+
expanded_1 = " ".join(expanded_1)
|
586 |
+
expanded_2 = flatten_and_stringify(expanded_2)
|
587 |
+
expanded_2 = " ".join(expanded_2)
|
588 |
+
|
589 |
+
prompt = flatten_and_stringify(prompt+expanded_1+expanded_2)
|
590 |
+
prompt = " ".join(prompt)
|
591 |
+
|
592 |
global model
|
593 |
global txt_tokenizer
|
594 |
del model
|
|
|
608 |
pil_image_4=sd_image_d,
|
609 |
pil_image_5=sd_image_e,
|
610 |
prompt=prompt+' '+expanded_1,
|
|
|
611 |
negative_prompt=negative_prompt,
|
612 |
text_scale=text_scale,
|
613 |
ip_scale=ip_scale,
|
|
|
734 |
expanded = expand_prompt(prompt+caption+caption_2)
|
735 |
expanded_1 = expanded[0]
|
736 |
expanded_2 = expanded[1]
|
737 |
+
|
738 |
+
expanded_1 = flatten_and_stringify(expanded_1)
|
739 |
+
expanded_1 = " ".join(expanded_1)
|
740 |
+
expanded_2 = flatten_and_stringify(expanded_2)
|
741 |
+
expanded_2 = " ".join(expanded_2)
|
742 |
+
|
743 |
+
prompt = flatten_and_stringify(prompt+expanded_1+expanded_2)
|
744 |
+
prompt = " ".join(prompt)
|
745 |
+
|
746 |
global model
|
747 |
global txt_tokenizer
|
748 |
del model
|
|
|
762 |
pil_image_4=sd_image_d,
|
763 |
pil_image_5=sd_image_e,
|
764 |
prompt=prompt+' '+expanded_1,
|
|
|
765 |
negative_prompt=negative_prompt,
|
766 |
text_scale=text_scale,
|
767 |
ip_scale=ip_scale,
|