tori29umai commited on
Commit
e94c3ce
·
1 Parent(s): 6dbbd62
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -101,7 +101,8 @@ class Img2Img:
101
 
102
  @spaces.GPU
103
  def predict(self, input_image_path, prompt, negative_prompt, controlnet_scale):
104
- pipe = load_model(self.lora_dir, self.cn_dir)
 
105
  input_image_pil = Image.open(input_image_path)
106
  base_size = input_image_pil.size
107
  resize_image = resize_image_aspect_ratio(input_image_pil)
@@ -116,7 +117,7 @@ class Img2Img:
116
  control_image=resize_image,
117
  strength=1.0,
118
  prompt=prompt,
119
- negative_prompt = negative_prompt,
120
  width=width,
121
  height=height,
122
  controlnet_conditioning_scale=float(controlnet_scale),
 
101
 
102
  @spaces.GPU
103
  def predict(self, input_image_path, prompt, negative_prompt, controlnet_scale):
104
+ # モデルのロードをここに移動
105
+ pipe = load_model(self.lora_dir, self.cn_dir)
106
  input_image_pil = Image.open(input_image_path)
107
  base_size = input_image_pil.size
108
  resize_image = resize_image_aspect_ratio(input_image_pil)
 
117
  control_image=resize_image,
118
  strength=1.0,
119
  prompt=prompt,
120
+ negative_prompt=negative_prompt,
121
  width=width,
122
  height=height,
123
  controlnet_conditioning_scale=float(controlnet_scale),