ComfyUI implementation of Regional Adaptive Sampling, (original implementation at https://github.com/microsoft/RAS).
Regional Adaptive Sampling is a new technique for accelerating the inference of diffusion transformers. It essentially works as a KV Cache inside the model, picking regions that are likely to be updated by each diffusion step and passing in only those tokens.
This implementation is simple to use, and compatible with Flux (dev & schnell) at HunYuanVideo. I may add support for other models in the future.
Apply the Regional Adaptive Sampling
node to the desired model. It has the following parameters:
hydrate_every
steps, we do a full run through the model with all tokens, to refresh the stale cache. Set to 0 to disable and do full RAS.