Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
dd5cc2b
1
Parent(s):
98a50a9
Update app.py
Browse files
app.py
CHANGED
@@ -46,10 +46,6 @@ def load_model(lora_model):
|
|
46 |
# LoRAモデルの設定
|
47 |
if lora_model == "とりにく風":
|
48 |
pipe.load_lora_weights(lora_dir, weight_name="tori29umai_line.safetensors")
|
49 |
-
elif lora_model == "少女漫画風":
|
50 |
-
pipe.load_lora_weights(lora_dir, weight_name="syoujomannga_line.safetensors")
|
51 |
-
elif lora_model == "劇画調風":
|
52 |
-
pipe.load_lora_weights(lora_dir, weight_name="gekiga_line.safetensors")
|
53 |
elif lora_model == "プレーン":
|
54 |
pass # プレーンの場合はLoRAを読み込まない
|
55 |
|
@@ -71,18 +67,8 @@ def predict(lora_model, input_image_path, prompt, negative_prompt, controlnet_sc
|
|
71 |
last_time = time.time()
|
72 |
|
73 |
# プロンプト生成
|
74 |
-
|
75 |
-
# LoRAモデルの設定
|
76 |
-
if lora_model == "とりにく風":
|
77 |
-
prompt = "masterpiece, best quality, monochrome, greyscale, lineart, white background, chibi " + prompt
|
78 |
-
elif lora_model == "少女漫画風":
|
79 |
-
prompt = "masterpiece, best quality, monochrome, greyscale, lineart, white background, star-shaped pupils, " + prompt
|
80 |
-
elif lora_model == "劇画調風":
|
81 |
-
prompt = "masterpiece, best quality, monochrome, greyscale, lineart, white background, " + prompt
|
82 |
-
elif lora_model == "プレーン":
|
83 |
-
prompt = "masterpiece, best quality, monochrome, greyscale, lineart, white background, " + prompt
|
84 |
|
85 |
-
|
86 |
execute_tags = ["realistic", "nose", "asian"]
|
87 |
prompt = execute_prompt(execute_tags, prompt)
|
88 |
prompt = remove_duplicates(prompt)
|
@@ -134,7 +120,7 @@ class Img2Img:
|
|
134 |
with gr.Row():
|
135 |
with gr.Column():
|
136 |
# LoRAモデル選択ドロップダウン
|
137 |
-
self.lora_model = gr.Dropdown(label="Image Style", choices=["
|
138 |
self.input_image_path = gr.Image(label="Input image", type='filepath')
|
139 |
self.bg_removed_image_path = gr.Image(label="Background Removed Image", type='filepath')
|
140 |
|
|
|
46 |
# LoRAモデルの設定
|
47 |
if lora_model == "とりにく風":
|
48 |
pipe.load_lora_weights(lora_dir, weight_name="tori29umai_line.safetensors")
|
|
|
|
|
|
|
|
|
49 |
elif lora_model == "プレーン":
|
50 |
pass # プレーンの場合はLoRAを読み込まない
|
51 |
|
|
|
67 |
last_time = time.time()
|
68 |
|
69 |
# プロンプト生成
|
70 |
+
prompt = "masterpiece, best quality, monochrome, greyscale, lineart, white background, " + prompt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
|
|
72 |
execute_tags = ["realistic", "nose", "asian"]
|
73 |
prompt = execute_prompt(execute_tags, prompt)
|
74 |
prompt = remove_duplicates(prompt)
|
|
|
120 |
with gr.Row():
|
121 |
with gr.Column():
|
122 |
# LoRAモデル選択ドロップダウン
|
123 |
+
self.lora_model = gr.Dropdown(label="Image Style", choices=["とりにく風", "プレーン"], value="とりにく風")
|
124 |
self.input_image_path = gr.Image(label="Input image", type='filepath')
|
125 |
self.bg_removed_image_path = gr.Image(label="Background Removed Image", type='filepath')
|
126 |
|