dvir-bria commited on
Commit
a228744
1 Parent(s): 0428173

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +4 -4
model.py CHANGED
@@ -3,7 +3,7 @@ from __future__ import annotations
3
  import gc
4
 
5
  import numpy as np
6
- import PIL.Image
7
  import torch
8
 
9
  from diffusers import (
@@ -107,12 +107,12 @@ class Model:
107
  self,
108
  prompt: str,
109
  negative_prompt: str,
110
- control_image: PIL.Image.Image,
111
  num_images: int,
112
  num_steps: int,
113
  controlnet_conditioning_scale: float,
114
  seed: int,
115
- ) -> list[PIL.Image.Image]:
116
  generator = torch.Generator().manual_seed(seed)
117
  return self.pipe(
118
  prompt=prompt,
@@ -160,7 +160,7 @@ class Model:
160
  num_steps: int,
161
  controlnet_conditioning_scale: float,
162
  seed: int,
163
- ) -> list[PIL.Image.Image]:
164
 
165
  # resize input_image to 1024x1024
166
  input_image = self.resize_image(image)
 
3
  import gc
4
 
5
  import numpy as np
6
+ from PIL import Image
7
  import torch
8
 
9
  from diffusers import (
 
107
  self,
108
  prompt: str,
109
  negative_prompt: str,
110
+ control_image: Image.Image,
111
  num_images: int,
112
  num_steps: int,
113
  controlnet_conditioning_scale: float,
114
  seed: int,
115
+ ) -> list[Image.Image]:
116
  generator = torch.Generator().manual_seed(seed)
117
  return self.pipe(
118
  prompt=prompt,
 
160
  num_steps: int,
161
  controlnet_conditioning_scale: float,
162
  seed: int,
163
+ ) -> list[Image.Image]:
164
 
165
  # resize input_image to 1024x1024
166
  input_image = self.resize_image(image)