rinong commited on
Commit
65a078b
1 Parent(s): 83dc64b

Fixed np latent when not editing

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -190,7 +190,7 @@ class ImageEditor(object):
190
 
191
  # if edit type is none or if all slides were set to 0
192
  if not target_latents:
193
- target_latents = [source_latent, ] * (len(generators) - 1)
194
 
195
  return target_latents
196
 
@@ -332,7 +332,8 @@ with blocks:
332
  with gr.TabItem("Edit Images"):
333
  with gr.Row():
334
  with gr.Column():
335
- img_button = gr.Button("Edit Image")
 
336
  with gr.Column():
337
  img_output = gr.Gallery(label="Output Images")
338
 
 
190
 
191
  # if edit type is none or if all slides were set to 0
192
  if not target_latents:
193
+ target_latents = [np_source_latent, ] * (len(generators) - 1)
194
 
195
  return target_latents
196
 
 
332
  with gr.TabItem("Edit Images"):
333
  with gr.Row():
334
  with gr.Column():
335
+ with gr.Row():
336
+ img_button = gr.Button("Edit Image")
337
  with gr.Column():
338
  img_output = gr.Gallery(label="Output Images")
339