Kevin commited on
Commit
4c0f7f0
1 Parent(s): eb8232e
Files changed (3) hide show
  1. Feifei.jpg +0 -0
  2. Musk.jpg +0 -0
  3. app.py +6 -4
Feifei.jpg ADDED
Musk.jpg ADDED
app.py CHANGED
@@ -124,23 +124,25 @@ with gr.Blocks() as demo:
124
  gr.Markdown("""
125
  # Official Implementation of [DiffMorpher](https://kevin-thu.github.io/DiffMorpher_page/)
126
 
127
- **Note: Try restarting the space if you got an error.* This is because the storage is limited now.
 
 
128
  """)
129
 
130
- original_image_0, original_image_1 = gr.State(Image.open("Trump.jpg").convert("RGB").resize((512,512), Image.BILINEAR)), gr.State(Image.open("Biden.jpg").convert("RGB").resize((512,512), Image.BILINEAR))
131
  # key_points_0, key_points_1 = gr.State([]), gr.State([])
132
  # to_change_points = gr.State([])
133
 
134
  with gr.Row():
135
  with gr.Column():
136
- input_img_0 = gr.Image(type="numpy", label="Input image A", value="Trump.jpg", show_label=True, height=LENGTH, width=LENGTH, interactive=True)
137
  prompt_0 = gr.Textbox(label="Prompt for image A", value="a photo of an American man", interactive=True)
138
  with gr.Row():
139
  train_lora_0_button = gr.Button("Train LoRA A")
140
  train_lora_1_button = gr.Button("Train LoRA B")
141
  # show_correspond_button = gr.Button("Show correspondence points")
142
  with gr.Column():
143
- input_img_1 = gr.Image(type="numpy", label="Input image B ", value="Biden.jpg", show_label=True, height=LENGTH, width=LENGTH, interactive=True)
144
  prompt_1 = gr.Textbox(label="Prompt for image B", value="a photo of an American man", interactive=True)
145
  with gr.Row():
146
  clear_button = gr.Button("Clear All")
 
124
  gr.Markdown("""
125
  # Official Implementation of [DiffMorpher](https://kevin-thu.github.io/DiffMorpher_page/)
126
 
127
+ **Note: Try restarting the space if you got an error.** This is because the storage is limited now.
128
+
129
+ Besides morphing, you can also try animations to make smooth videos too.
130
  """)
131
 
132
+ original_image_0, original_image_1 = gr.State(Image.open("Musk.jpg").convert("RGB").resize((512,512), Image.BILINEAR)), gr.State(Image.open("Feifei.jpg").convert("RGB").resize((512,512), Image.BILINEAR))
133
  # key_points_0, key_points_1 = gr.State([]), gr.State([])
134
  # to_change_points = gr.State([])
135
 
136
  with gr.Row():
137
  with gr.Column():
138
+ input_img_0 = gr.Image(type="numpy", label="Input image A", value="Musk.jpg", show_label=True, height=LENGTH, width=LENGTH, interactive=True)
139
  prompt_0 = gr.Textbox(label="Prompt for image A", value="a photo of an American man", interactive=True)
140
  with gr.Row():
141
  train_lora_0_button = gr.Button("Train LoRA A")
142
  train_lora_1_button = gr.Button("Train LoRA B")
143
  # show_correspond_button = gr.Button("Show correspondence points")
144
  with gr.Column():
145
+ input_img_1 = gr.Image(type="numpy", label="Input image B ", value="Feifei.jpg", show_label=True, height=LENGTH, width=LENGTH, interactive=True)
146
  prompt_1 = gr.Textbox(label="Prompt for image B", value="a photo of an American man", interactive=True)
147
  with gr.Row():
148
  clear_button = gr.Button("Clear All")