Unverified Commit 13f0c8b2 authored by Vinh H. Pham's avatar Vinh H. Pham Committed by GitHub
Browse files

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



Update callback.md
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent fa1bdce3
...@@ -31,9 +31,9 @@ def callback_dynamic_cfg(pipe, step_index, timestep, callback_kwargs): ...@@ -31,9 +31,9 @@ def callback_dynamic_cfg(pipe, step_index, timestep, callback_kwargs):
prompt_embeds = callback_kwargs["prompt_embeds"] prompt_embeds = callback_kwargs["prompt_embeds"]
prompt_embeds = prompt_embeds.chunk(2)[-1] prompt_embeds = prompt_embeds.chunk(2)[-1]
# update guidance_scale and prompt_embeds # update guidance_scale and prompt_embeds
pipe._guidance_scale = 0.0 pipe._guidance_scale = 0.0
callback_kwargs["prompt_embeds"] = prompt_embeds callback_kwargs["prompt_embeds"] = prompt_embeds
return callback_kwargs return callback_kwargs
``` ```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment