Files
blepping-comfyui_overly_com…/py/step_samplers/misc.py
T
blepping d8574bae2d Mega update (#8)
* Weird experiments with sampler blending

* Mega sync

* Use ComfyUI union types for wildcard inputs when available

* Add weoon wavelet sampler

* Fix noise sampler caching not considering immiscible settings
Allow specifying alt custom noise/immiscible settings for samplers that internally add noise
AFS support at the merge sampler level
Allow the Weoon internal step to use ETA
Add t_copysign expression function

* Start updating documentation

* Add ImmiscibleReference node, other changes

* Respect factor in ImmiscibleReference noise

* Fixing normalizing in ImmiscibleReference noise

* Handle case where there are no RGB factors (i.e. audio models)

* Fix rectified flow type detection for non-Flux models

* Add more tensor ops, add OCS ApplyExpressionImage/Latent nodes

* Rename ApplyExpression nodes to ApplyFilter, expression QoL improvements

* Fix apply filter nodes definitions

* Make t_noise handler work for image-latents.

* Add t_new_like expression function

* Make it possible to comment out lines with hash in expressions

* Add gradient estimation, pingpong and res_multistep samplers.
Add pingpong group merge method.
Remove model call caching stuff.
Allow defining pre_cfg and post_cfg filters.
Handle filters changing the latent shape better.
Allow disabling detecting out of order sigmas as restart sampling.

* Sync current updates (which I am too lazy to describe individually)

* Add ExpressionFilteredNoise node
Improvements to immiscible noise handling/expanded features
2025-08-09 07:28:10 -06:00

30 lines
930 B
Python

from .base import SingleStepSampler, registry
# Referenced from https://github.com/ace-step/ACE-Step/
class PingPongStep(SingleStepSampler):
name = "pingpong"
default_eta = 0.0
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
pingpong_options = self.options.pop("pingpong", {})
self.pingpong_start_step = pingpong_options.get("start_step", 0)
self.pingpong_end_step = pingpong_options.get("end_step", 0)
def step(self, x):
ss = self.ss
use_pingpong = self.pingpong_start_step <= ss.step <= self.pingpong_end_step
if not use_pingpong:
return (yield from self.euler_step(x, eta=0.0))
sn = ss.sigma_next
denoised = (
ss.denoised * (1.0 - sn) if ss.model.is_rectified_flow else ss.denoised
)
yield from self.result(denoised, sn, sigma_down=sn)
registry.add(
PingPongStep,
)