Spaces:
Running
on
Zero
Running
on
Zero
fix: wrong infer function
Browse files
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=
|
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
|