-
-
Notifications
You must be signed in to change notification settings - Fork 110
Schedulers
Alex "mcmonkey" Goodwin edited this page Jun 22, 2023
·
11 revisions
- A scheduler changes your CFG Scale (or mimic scale) over time per step.
- For example, with
Linear Up
, if you haveCFG Scale: 20
andCFG Scale Minimum: 5
for 20 steps, step 1 will be ran withCFG Scale: 5
, step 10 withCFG Scale: 12.5
and Step 20 will be ran withCFG Scale: 20
(a smooth line increasing from 5 to 20).
- Different
CFG Scale
values have different effects at different step counts. For example, in the early steps, a too-high value will burn an image. In the final steps, extremely high values will just boost the detail without any burn. ThePower Up
scheduler maxes out this example by running at a low CFG Scale for most steps and then running at a super high one for the final steps, maximizing small details without damaging the overall image.
-
Constant
is effectively just disabled scheduling. Whatever your CFG Scale is, will be used throughout the render. This is how default SD runs normally. -
Half Cosine up
is a pretty nice curve,Cosine Up
andLinear Up
work well too, a bit more situationally.- Note that
Half
as the name implies only maxes out at half the specified scale value (so set your CFG scale extra high for this scheduler). All others go the exact scale value for the final step.
- Note that
- The
Down
schedulers have potential use cases but the details still need to be explored and documented. -
Linear Repeating
,Cosine Repeating
, andSawtooth
do repeated oscillations, based on the scheduler value as the number of repeats.- With
CFG Scale: 10, CFG scale minimum: 5, Steps: 10, CFG Mode: Linear Repeating, Scheduler Value: 2
, the CFG scales will be10, 8, 6, 6, 8, 10, 8, 6, 6, 8
. As you can see, it starts high, then goes down, then back up, and repeat. - This is a new, experimental option that might improve quality in some cases - more testing is needed.
- With
-
Power Up
scheduler is very useful for refining small details, in combination with a very high CFG scale and a reasonable CFG minimum (it essentially runs at the minimum for most steps, then ramps up fast to the max for the last few steps, with theScheduler Value
controlling how fast it ramps up and for how many steps).- An example of valid input:
Steps: 3, Mimic scale: 8, Threshold percentile: 90, Mimic mode: Power Up, Mimic scale minimum: 2, CFG mode: Power Up, CFG scale minimum: 2.5, Scheduler Value: 10
. - Yep, that example said 3 steps! You're not gonna get a great image with just 3, but this is just to show how much can be achieved, compare normal SD vs The above settings:
- An example of valid input:
- The
minimum
values apply for all schedulers other thanConstant
-
Power Scheduler Value
is exclusive toPower Up