fastvideo.v1.forward_context
#
Module Contents#
Classes#
Functions#
Get the current forward context. |
|
A context manager that stores the current forward context, can be attention metadata, etc. Here we can inject common logic for every model forward pass. |
Data#
API#
- class fastvideo.v1.forward_context.ForwardContext[source]#
-
- forward_batch: Optional[fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch][source]#
None
- fastvideo.v1.forward_context.batchsize_forward_time: collections.defaultdict[source]#
‘defaultdict(…)’
- fastvideo.v1.forward_context.get_forward_context() fastvideo.v1.forward_context.ForwardContext [source]#
Get the current forward context.
- fastvideo.v1.forward_context.set_forward_context(current_timestep, attn_metadata, forward_batch: Optional[fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch] = None, fastvideo_args: Optional[fastvideo.v1.fastvideo_args.FastVideoArgs] = None)[source]#
A context manager that stores the current forward context, can be attention metadata, etc. Here we can inject common logic for every model forward pass.