Linoy Tsaban commited on
Commit
3be3aae
1 Parent(s): 5a65206

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -74,8 +74,8 @@ def edit(input_image,
74
  tar_cfg_scale=15,
75
  edit_concept="",
76
  sega_edit_guidance=0,
77
- warm_up=1,
78
- neg_guidance=False,
79
  flip=False,
80
  left = 0,
81
  right = 0,
@@ -98,8 +98,9 @@ def edit(input_image,
98
  #pure DDPM output
99
  pure_ddpm_out = sample(wt, zs, wts, prompt_tar=tar_prompt,
100
  cfg_scale_tar=tar_cfg_scale, skip=skip)
101
- yield pure_ddpm_out, pure_ddpm_out
102
 
 
 
103
  # SEGA
104
  edit_concepts = edit_concept.split(",")
105
  neg_guidance =[]
 
74
  tar_cfg_scale=15,
75
  edit_concept="",
76
  sega_edit_guidance=0,
77
+ # warm_up=1,
78
+ # neg_guidance=False,
79
  flip=False,
80
  left = 0,
81
  right = 0,
 
98
  #pure DDPM output
99
  pure_ddpm_out = sample(wt, zs, wts, prompt_tar=tar_prompt,
100
  cfg_scale_tar=tar_cfg_scale, skip=skip)
 
101
 
102
+ if not edit_concepts or not sega_edit_guidance:
103
+ return pure_ddpm_out,pure_ddpm_out
104
  # SEGA
105
  edit_concepts = edit_concept.split(",")
106
  neg_guidance =[]