Spaces:
Sleeping
Sleeping
se agrega galería de loras
Browse files- app.py +25 -11
- loras.json +8 -0
app.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
|
|
3 |
from gradio_client import Client
|
4 |
|
5 |
-
|
|
|
6 |
|
7 |
def infer (prompt, style_prompt, inf_steps, guidance_scale, width, height, seed, lora_weight, progress=gr.Progress(track_tqdm=True)):
|
8 |
custom_model="lichorosario/dott_remastered_style_lora_sdxl"
|
@@ -80,17 +82,29 @@ with gr.Blocks(css=css) as demo:
|
|
80 |
"**Note**: Generation quality may vary. For best results, adjust the parameters.\n"
|
81 |
"Special thanks to [@artificialguybr](https://huggingface.co/artificialguybr) and [@fffiloni](https://huggingface.co/fffiloni)."
|
82 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
with gr.Column(elem_id="col-container"):
|
84 |
-
prompt_in = gr.Textbox(
|
85 |
-
label="Your Prompt",
|
86 |
-
info = "Dont' forget to include your trigger word if necessary"
|
87 |
-
)
|
88 |
-
style_prompt_in = gr.Textbox(
|
89 |
-
label="Your Style Prompt"
|
90 |
-
)
|
91 |
-
used_prompt = gr.Textbox(
|
92 |
-
label="Used prompt"
|
93 |
-
)
|
94 |
with gr.Accordion("Advanced Settings", open=False):
|
95 |
with gr.Row():
|
96 |
inf_steps = gr.Slider(
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
+
import json
|
4 |
from gradio_client import Client
|
5 |
|
6 |
+
with open('loras.json', 'r') as f:
|
7 |
+
loras = json.load(f)
|
8 |
|
9 |
def infer (prompt, style_prompt, inf_steps, guidance_scale, width, height, seed, lora_weight, progress=gr.Progress(track_tqdm=True)):
|
10 |
custom_model="lichorosario/dott_remastered_style_lora_sdxl"
|
|
|
82 |
"**Note**: Generation quality may vary. For best results, adjust the parameters.\n"
|
83 |
"Special thanks to [@artificialguybr](https://huggingface.co/artificialguybr) and [@fffiloni](https://huggingface.co/fffiloni)."
|
84 |
)
|
85 |
+
|
86 |
+
with gr.Row():
|
87 |
+
with gr.Column(scale=2):
|
88 |
+
prompt_in = gr.Textbox(
|
89 |
+
label="Your Prompt",
|
90 |
+
info = "Dont' forget to include your trigger word if necessary"
|
91 |
+
)
|
92 |
+
style_prompt_in = gr.Textbox(
|
93 |
+
label="Your Style Prompt"
|
94 |
+
)
|
95 |
+
used_prompt = gr.Textbox(
|
96 |
+
label="Used prompt"
|
97 |
+
)
|
98 |
+
|
99 |
+
with gr.Column(scale=1):
|
100 |
+
gallery = gr.Gallery(
|
101 |
+
[(item["image"], item["title"]) for item in loras],
|
102 |
+
label="LoRA Gallery",
|
103 |
+
allow_preview=False,
|
104 |
+
columns=2
|
105 |
+
)
|
106 |
+
|
107 |
with gr.Column(elem_id="col-container"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
with gr.Accordion("Advanced Settings", open=False):
|
109 |
with gr.Row():
|
110 |
inf_steps = gr.Slider(
|
loras.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
image: "images/dott.png",
|
4 |
+
title: "Day of the Tentacle Remastered",
|
5 |
+
repo: "lichorosario/dott_remastered_style_lora_sdxl",
|
6 |
+
trigger_word: "dott style"
|
7 |
+
}
|
8 |
+
]
|