Skip to content

Commit a267b45

Browse files
committed
doc: type hints for Generator
1 parent d4ccd08 commit a267b45

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ldm/invoke/generator/base.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,19 @@
1414
from tqdm import trange
1515

1616
from ldm.invoke.devices import choose_autocast
17+
from ldm.models.diffusion.ddpm import DiffusionWrapper
1718
from ldm.util import rand_perlin_2d
1819

1920
downsampling = 8
2021
CAUTION_IMG = 'assets/caution.png'
2122

22-
class Generator():
23-
def __init__(self, model, precision):
23+
class Generator:
24+
downsampling_factor: int
25+
latent_channels: int
26+
precision: str
27+
model: DiffusionWrapper
28+
29+
def __init__(self, model: DiffusionWrapper, precision: str):
2430
self.model = model
2531
self.precision = precision
2632
self.seed = None

0 commit comments

Comments
 (0)