Update app.py
Browse files
app.py
CHANGED
|
@@ -99,7 +99,14 @@ class OrangeRedTheme(Soft):
|
|
| 99 |
orange_red_theme = OrangeRedTheme()
|
| 100 |
|
| 101 |
loras = [
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
{
|
| 104 |
"image": "https://huggingface.co/strangerzonehf/Flux-Ultimate-LoRA-Collection/resolve/main/images/1111111111.png",
|
| 105 |
"title": "AWPortrait Z",
|
|
@@ -388,7 +395,11 @@ def update_selection(evt: gr.SelectData, width, height):
|
|
| 388 |
selected_lora = loras[evt.index]
|
| 389 |
new_placeholder = f"Type a prompt for {selected_lora['title']}"
|
| 390 |
lora_repo = selected_lora["repo"]
|
| 391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 392 |
if "aspect" in selected_lora:
|
| 393 |
if selected_lora["aspect"] == "portrait":
|
| 394 |
width = 768
|
|
|
|
| 99 |
orange_red_theme = OrangeRedTheme()
|
| 100 |
|
| 101 |
loras = [
|
| 102 |
+
# 로컬 Trump LoRA (app.py와 같은 디렉토리에 trump.safetensors 필요)
|
| 103 |
+
{
|
| 104 |
+
"image": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Donald_Trump_official_portrait.jpg/800px-Donald_Trump_official_portrait.jpg",
|
| 105 |
+
"title": "Trump Style",
|
| 106 |
+
"repo": "./", # 로컬 경로
|
| 107 |
+
"weights": "trump.safetensors",
|
| 108 |
+
"trigger_word": "Trump"
|
| 109 |
+
},
|
| 110 |
{
|
| 111 |
"image": "https://huggingface.co/strangerzonehf/Flux-Ultimate-LoRA-Collection/resolve/main/images/1111111111.png",
|
| 112 |
"title": "AWPortrait Z",
|
|
|
|
| 395 |
selected_lora = loras[evt.index]
|
| 396 |
new_placeholder = f"Type a prompt for {selected_lora['title']}"
|
| 397 |
lora_repo = selected_lora["repo"]
|
| 398 |
+
# 로컬 LoRA 처리
|
| 399 |
+
if lora_repo == "./":
|
| 400 |
+
updated_text = f"### Selected: Local LoRA - {selected_lora['title']} ✅"
|
| 401 |
+
else:
|
| 402 |
+
updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) ✅"
|
| 403 |
if "aspect" in selected_lora:
|
| 404 |
if selected_lora["aspect"] == "portrait":
|
| 405 |
width = 768
|