p1atdev commited on
Commit
939afee
Β·
1 Parent(s): 7cfb22a

fix: wrong infer function

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. tkg.py +0 -2
app.py CHANGED
@@ -215,7 +215,7 @@ TKG-DMπŸ₯šπŸš: Training-free Chroma Key Content Generation Diffusion Model
215
 
216
  gr.on(
217
  triggers=[run_button.click, prompt.submit],
218
- fn=infer,
219
  inputs=[
220
  prompt,
221
  negative_prompt,
 
215
 
216
  gr.on(
217
  triggers=[run_button.click, prompt.submit],
218
+ fn=on_generate,
219
  inputs=[
220
  prompt,
221
  negative_prompt,
tkg.py CHANGED
@@ -22,8 +22,6 @@ def get_mean_shifted_latents(
22
  latent_channel = shifted_latents[:, idx, :, :]
23
 
24
  positive_ratio = (latent_channel > 0).float().mean()
25
- print("positive_ratio", positive_ratio)
26
- print("shift", shift, "sign", sign)
27
  target_ratio = positive_ratio + shift * sign
28
 
29
  # gradually shift latent_channel
 
22
  latent_channel = shifted_latents[:, idx, :, :]
23
 
24
  positive_ratio = (latent_channel > 0).float().mean()
 
 
25
  target_ratio = positive_ratio + shift * sign
26
 
27
  # gradually shift latent_channel