You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/using-diffusers/callback.md
+78Lines changed: 78 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,84 @@ pipeline(
157
157
)
158
158
```
159
159
160
+
## IP Adapter Cutoff
161
+
162
+
IP Adapter is an image prompt adapter that can be used for diffusion models without any changes to the underlying model. We can use the IP Adapter Cutoff Callback to disable the IP Adapter after a certain number of steps. To set up the callback, you need to specify the number of denoising steps after which the callback comes into effect. You can do so by using either one of these two arguments:
163
+
164
+
-`cutoff_step_ratio`: Float number with the ratio of the steps.
165
+
-`cutoff_step_index`: Integer number with the exact number of the step.
166
+
167
+
We need to download the diffusion model and load the ip_adapter for it as follows:
<img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/without_callback.png" alt="generated image of a tiger sitting in a chair drinking orange juice" />
<img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/with_callback2.png" alt="generated image of a tiger sitting in a chair drinking orange juice with ip adapter callback" />
0 commit comments