Turbo sampler: polish step is on by default at 0.25
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tw9fjUCoaPNZ8uLoL2xACR
This commit is contained in:
@@ -12,7 +12,7 @@ flow step that has three dials:
|
||||
stage, because a Two stages hand-over changes the size.
|
||||
* Step spacing per stage: the steps inside a stage are moved earlier or later while the stage's first and
|
||||
last sigma stay put, so the hand-over point never moves. 1 = the schedule as given.
|
||||
* Polish step (optional): after the last step, noise the finished picture back to a small sigma and let the
|
||||
* Polish step (on by default at 0.25): after the last step, noise the finished picture back to a small sigma and let the
|
||||
model answer once more at full size. One extra model call, in the last stage only.
|
||||
|
||||
The sound is stepped without fresh noise and without second order. Samplers that call the model twice per
|
||||
@@ -78,9 +78,9 @@ SETTINGS = {
|
||||
"when": {"enabled": True},
|
||||
},
|
||||
"polish": {
|
||||
"type": "float", "default": 0.0, "min": 0.0, "max": 0.6, "step": 0.01,
|
||||
"type": "float", "default": 0.25, "min": 0.0, "max": 0.6, "step": 0.01,
|
||||
"label": "Polish step sigma", "ui": "slider",
|
||||
"hint": "0 = off. Otherwise one extra full-size model call after the last step, from this small noise "
|
||||
"hint": "0 = off. Default 0.25. Otherwise one extra full-size model call after the last step, from this small noise "
|
||||
"level. Costs one step (about 15 to 25% of a run). Around 0.25 to 0.3 has given more natural motion on a rental.",
|
||||
"when": {"enabled": True},
|
||||
},
|
||||
|
||||
@@ -147,7 +147,7 @@ def test_runs_through_two_stages_with_any_split(model, sigmas, cut):
|
||||
|
||||
|
||||
def test_without_two_stages_and_without_polish(model):
|
||||
values = {"enabled": True, **_settings()}
|
||||
values = {"enabled": True, **_settings(polish=0.0)}
|
||||
_, out, calls = _guided(model, values, (1.0, 0.7, 0.3, 0.0))
|
||||
assert len(calls) == 3 and torch.isfinite(out.unbind()[0]).all()
|
||||
|
||||
@@ -167,3 +167,9 @@ def test_registered_in_comfys_lists_and_runs_like_the_module(model):
|
||||
latent = NestedTensor((torch.zeros(1, 24, 2, 8, 8), torch.zeros(1, 32, 2, 3)))
|
||||
out = guider.sample(noise, latent, comfy.samplers.sampler_object("funui_turbo"), sigmas, seed=1, disable_pbar=True)
|
||||
assert torch.isfinite(out.unbind()[0]).all()
|
||||
|
||||
|
||||
def test_polish_is_on_by_default_at_a_quarter(model):
|
||||
assert SETTINGS["polish"]["default"] == 0.25
|
||||
_, _, calls = _guided(model, {"enabled": True, **_settings()}, (1.0, 0.7, 0.3, 0.0))
|
||||
assert len(calls) == 4 and calls[-1] == pytest.approx(0.25)
|
||||
|
||||
Reference in New Issue
Block a user