Skip to content

Commit

Permalink
add back type annotation that disappeared
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbern committed Dec 20, 2023
1 parent d6f7437 commit 27b2482
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 06_gpu_and_ml/stable_diffusion/stable_diffusion_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def __enter__(self):
__build__ = __enter__

@method()
def run_inference(self, prompt: str, steps: int = 20, batch_size: int = 4):
def run_inference(
self, prompt: str, steps: int = 20, batch_size: int = 4
) -> list[bytes]:
with torch.inference_mode():
with torch.autocast("cuda"):
images = self.pipe(
Expand Down

0 comments on commit 27b2482

Please sign in to comment.