Spaces:
Runtime error
Runtime error
ShaoTengLiu
commited on
Commit
•
a163762
1
Parent(s):
3b4ffb9
can work on gradio
Browse files- Video-P2P/run.py +1 -1
- app_training.py +6 -6
- trainer.py +1 -1
Video-P2P/run.py
CHANGED
@@ -978,7 +978,7 @@ def main(
|
|
978 |
inversion.append( Image.fromarray((sequence1[i] * 255).numpy().astype(np.uint8)) )
|
979 |
videop2p.append( Image.fromarray((sequence2[i] * 255).numpy().astype(np.uint8)) )
|
980 |
|
981 |
-
inversion[0].save(save_name_1, save_all=True, append_images=inversion[1:], optimize=False, loop=0, duration=250)
|
982 |
videop2p[0].save(save_name_2, save_all=True, append_images=videop2p[1:], optimize=False, loop=0, duration=250)
|
983 |
|
984 |
|
|
|
978 |
inversion.append( Image.fromarray((sequence1[i] * 255).numpy().astype(np.uint8)) )
|
979 |
videop2p.append( Image.fromarray((sequence2[i] * 255).numpy().astype(np.uint8)) )
|
980 |
|
981 |
+
# inversion[0].save(save_name_1, save_all=True, append_images=inversion[1:], optimize=False, loop=0, duration=250)
|
982 |
videop2p[0].save(save_name_2, save_all=True, append_images=videop2p[1:], optimize=False, loop=0, duration=250)
|
983 |
|
984 |
|
app_training.py
CHANGED
@@ -85,23 +85,23 @@ def create_training_demo(trainer: Trainer,
|
|
85 |
validation_prompt = gr.Text(
|
86 |
label='Validation Prompt',
|
87 |
placeholder=
|
88 |
-
'prompt to test the model, e.g: a
|
89 |
blend_word_1 = gr.Text(
|
90 |
-
label='blend_word(
|
91 |
placeholder=
|
92 |
'man')
|
93 |
blend_word_2 = gr.Text(
|
94 |
-
label='blend_word(
|
95 |
placeholder=
|
96 |
-
'
|
97 |
eq_params_1 = gr.Text(
|
98 |
label='reweight_word',
|
99 |
placeholder=
|
100 |
-
'
|
101 |
eq_params_2 = gr.Text(
|
102 |
label='reweight_value',
|
103 |
placeholder=
|
104 |
-
'
|
105 |
with gr.Column():
|
106 |
gr.Markdown('Upload Settings')
|
107 |
with gr.Row():
|
|
|
85 |
validation_prompt = gr.Text(
|
86 |
label='Validation Prompt',
|
87 |
placeholder=
|
88 |
+
'prompt to test the model, e.g: a Lego man is surfing')
|
89 |
blend_word_1 = gr.Text(
|
90 |
+
label='blend_word(source)',
|
91 |
placeholder=
|
92 |
'man')
|
93 |
blend_word_2 = gr.Text(
|
94 |
+
label='blend_word(target)',
|
95 |
placeholder=
|
96 |
+
'man')
|
97 |
eq_params_1 = gr.Text(
|
98 |
label='reweight_word',
|
99 |
placeholder=
|
100 |
+
'Lego')
|
101 |
eq_params_2 = gr.Text(
|
102 |
label='reweight_value',
|
103 |
placeholder=
|
104 |
+
'8')
|
105 |
with gr.Column():
|
106 |
gr.Markdown('Upload Settings')
|
107 |
with gr.Row():
|
trainer.py
CHANGED
@@ -151,7 +151,7 @@ class Trainer:
|
|
151 |
base_model=base_model,
|
152 |
training_prompt=training_prompt,
|
153 |
test_prompt=validation_prompt,
|
154 |
-
test_image_dir='
|
155 |
|
156 |
message = 'Training completed!'
|
157 |
print(message)
|
|
|
151 |
base_model=base_model,
|
152 |
training_prompt=training_prompt,
|
153 |
test_prompt=validation_prompt,
|
154 |
+
test_image_dir='results')
|
155 |
|
156 |
message = 'Training completed!'
|
157 |
print(message)
|