1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

[Docs] Update callback.md code example (#7150)

Update callback.md

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
Vinh H. Pham
2024-03-05 10:14:19 +07:00
committed by GitHub
parent fa1bdce3d4
commit 13f0c8b219

View File

@@ -31,9 +31,9 @@ def callback_dynamic_cfg(pipe, step_index, timestep, callback_kwargs):
prompt_embeds = callback_kwargs["prompt_embeds"]
prompt_embeds = prompt_embeds.chunk(2)[-1]
# update guidance_scale and prompt_embeds
pipe._guidance_scale = 0.0
callback_kwargs["prompt_embeds"] = prompt_embeds
# update guidance_scale and prompt_embeds
pipe._guidance_scale = 0.0
callback_kwargs["prompt_embeds"] = prompt_embeds
return callback_kwargs
```