Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
d49ade0
1
Parent(s):
707861c
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,10 @@ class Img2Img:
|
|
63 |
|
64 |
@spaces.GPU(duration=120)
|
65 |
def predict(self, lora_model, input_image_path, prompt, negative_prompt, controlnet_scale):
|
|
|
66 |
pipe = self.load_model(lora_model)
|
|
|
|
|
67 |
input_image = Image.open(input_image_path)
|
68 |
base_image = base_generation(input_image.size, (255, 255, 255, 255)).convert("RGB")
|
69 |
resize_image = resize_image_aspect_ratio(input_image)
|
|
|
63 |
|
64 |
@spaces.GPU(duration=120)
|
65 |
def predict(self, lora_model, input_image_path, prompt, negative_prompt, controlnet_scale):
|
66 |
+
# ここで新たなpipeを作成するのではなく、キャッシュしたpipeを取得
|
67 |
pipe = self.load_model(lora_model)
|
68 |
+
|
69 |
+
# 画像読み込みとリサイズ
|
70 |
input_image = Image.open(input_image_path)
|
71 |
base_image = base_generation(input_image.size, (255, 255, 255, 255)).convert("RGB")
|
72 |
resize_image = resize_image_aspect_ratio(input_image)
|