fastvideo.v1.forward_context#

Module Contents#

Classes#

Functions#

get_forward_context

Get the current forward context.

set_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]#
attn_metadata: fastvideo.v1.attention.AttentionMetadata[source]#

None

current_timestep: int[source]#

None

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.batchsize_logging_interval: float[source]#

1000

fastvideo.v1.forward_context.forward_start_time: float[source]#

0

fastvideo.v1.forward_context.get_forward_context() fastvideo.v1.forward_context.ForwardContext[source]#

Get the current forward context.

fastvideo.v1.forward_context.last_logging_time: float[source]#

0

fastvideo.v1.forward_context.logger[source]#

‘init_logger(…)’

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.

fastvideo.v1.forward_context.track_batchsize: bool[source]#

False