scheduler.py 317 Bytes
Newer Older
helloyongyang's avatar
helloyongyang committed
1
2
3
import torch


Dongz's avatar
Dongz committed
4
class BaseScheduler:
helloyongyang's avatar
helloyongyang committed
5
6
7
8
    def __init__(self, args):
        self.args = args
        self.step_index = 0
        self.latents = None
Dongz's avatar
Dongz committed
9

helloyongyang's avatar
helloyongyang committed
10
11
12
    def step_pre(self, step_index):
        self.step_index = step_index
        self.latents = self.latents.to(dtype=torch.bfloat16)
13
14
15

    def clear(self):
        pass