yamildiego commited on
Commit
06e49f5
·
1 Parent(s): 1491344

test padding mode

Browse files
Files changed (1) hide show
  1. handler.py +7 -2
handler.py CHANGED
@@ -100,6 +100,12 @@ class EndpointHandler():
100
  self.pipe.controlnet = self.controlnet
101
 
102
 
 
 
 
 
 
 
103
  # hyperparamters
104
  negatice_prompt = data.pop("negative_prompt", None)
105
  num_inference_steps = data.pop("num_inference_steps", 30)
@@ -131,8 +137,7 @@ class EndpointHandler():
131
  height=height,
132
  width=width,
133
  controlnet_conditioning_scale=controlnet_conditioning_scale,
134
- generator=self.generator,
135
- tiling=tiling
136
  )
137
 
138
 
 
100
  self.pipe.controlnet = self.controlnet
101
 
102
 
103
+ targets = [self.pipe.vae, self.pipe.unet]
104
+ for target in targets:
105
+ for module in target.modules():
106
+ if isinstance(module, torch.nn.Conv2d):
107
+ module.padding_mode = "circular"
108
+
109
  # hyperparamters
110
  negatice_prompt = data.pop("negative_prompt", None)
111
  num_inference_steps = data.pop("num_inference_steps", 30)
 
137
  height=height,
138
  width=width,
139
  controlnet_conditioning_scale=controlnet_conditioning_scale,
140
+ generator=self.generator
 
141
  )
142
 
143