Spaces:
Sleeping
Sleeping
feat: Add style prompt input to infer function in app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from gradio_client import Client
|
|
4 |
|
5 |
|
6 |
|
7 |
-
def infer (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"
|
9 |
weight_name="dott_style.safetensors"
|
10 |
|
@@ -18,7 +18,7 @@ def infer (prompt, inf_steps, guidance_scale, width, height, seed, lora_weight,
|
|
18 |
result = client.predict(
|
19 |
custom_model=custom_model,
|
20 |
weight_name=weight_name,
|
21 |
-
prompt="dott style. "+prompt,
|
22 |
inf_steps=inf_steps,
|
23 |
guidance_scale=guidance_scale,
|
24 |
width=width,
|
@@ -76,6 +76,9 @@ with gr.Blocks(css=css) as demo:
|
|
76 |
label="Your Prompt",
|
77 |
info = "Dont' forget to include your trigger word if necessary"
|
78 |
)
|
|
|
|
|
|
|
79 |
with gr.Accordion("Advanced Settings", open=False):
|
80 |
with gr.Row():
|
81 |
inf_steps = gr.Slider(
|
@@ -133,7 +136,7 @@ with gr.Blocks(css=css) as demo:
|
|
133 |
|
134 |
submit_btn.click(
|
135 |
fn = infer,
|
136 |
-
inputs = [prompt_in, inf_steps, guidance_scale, width, height, seed, lora_weight],
|
137 |
outputs = [image_out, last_used_seed]
|
138 |
)
|
139 |
|
|
|
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"
|
9 |
weight_name="dott_style.safetensors"
|
10 |
|
|
|
18 |
result = client.predict(
|
19 |
custom_model=custom_model,
|
20 |
weight_name=weight_name,
|
21 |
+
prompt="dott style. "+prompt+". "+style_prompt,
|
22 |
inf_steps=inf_steps,
|
23 |
guidance_scale=guidance_scale,
|
24 |
width=width,
|
|
|
76 |
label="Your Prompt",
|
77 |
info = "Dont' forget to include your trigger word if necessary"
|
78 |
)
|
79 |
+
style_prompt_in = gr.Textbox(
|
80 |
+
label="Your Style Prompt"
|
81 |
+
)
|
82 |
with gr.Accordion("Advanced Settings", open=False):
|
83 |
with gr.Row():
|
84 |
inf_steps = gr.Slider(
|
|
|
136 |
|
137 |
submit_btn.click(
|
138 |
fn = infer,
|
139 |
+
inputs = [prompt_in, style_prompt_in, inf_steps, guidance_scale, width, height, seed, lora_weight],
|
140 |
outputs = [image_out, last_used_seed]
|
141 |
)
|
142 |
|