Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ def predict(replicate_api, prompt, lora_id, lora_scale=0.95, aspect_ratio="1:1",
|
|
36 |
}
|
37 |
|
38 |
# If lora_id is provided, include it in the input
|
39 |
-
if lora_id:
|
40 |
-
input_params["hf_lora"] = lora_id
|
41 |
input_params["lora_scale"] = lora_scale
|
42 |
|
43 |
try:
|
@@ -75,10 +75,10 @@ examples = [
|
|
75 |
|
76 |
with gr.Blocks(css=css) as demo:
|
77 |
with gr.Column(elem_id="col-container"):
|
78 |
-
gr.Markdown("# FLUX Dev with
|
79 |
|
80 |
-
replicate_api = gr.Text(label="Replicate API", show_label=True, max_lines=1, placeholder="Enter Replicate API", container=
|
81 |
-
prompt = gr.Text(label="Prompt", show_label=True, max_lines=4, show_copy_button = True, placeholder="Enter your prompt", container=
|
82 |
with gr.Accordion("Advanced Settings", open=False):
|
83 |
with gr.Row():
|
84 |
custom_lora = gr.Textbox(label="Custom LoRA", info="LoRA Hugging Face path (optional)", placeholder="multimodalart/vintage-ads-flux")
|
@@ -105,7 +105,7 @@ with gr.Blocks(css=css) as demo:
|
|
105 |
label="Guidance Scale",
|
106 |
minimum=1,
|
107 |
maximum=15,
|
108 |
-
step=0.
|
109 |
value=3.5,
|
110 |
)
|
111 |
num_inference_steps = gr.Slider(
|
|
|
36 |
}
|
37 |
|
38 |
# If lora_id is provided, include it in the input
|
39 |
+
if lora_id and lora_id.strip()!="":
|
40 |
+
input_params["hf_lora"] = lora_id.strip()
|
41 |
input_params["lora_scale"] = lora_scale
|
42 |
|
43 |
try:
|
|
|
75 |
|
76 |
with gr.Blocks(css=css) as demo:
|
77 |
with gr.Column(elem_id="col-container"):
|
78 |
+
gr.Markdown("# FLUX Dev with Replicate API")
|
79 |
|
80 |
+
replicate_api = gr.Text(label="Replicate API", show_label=True, max_lines=1, placeholder="Enter Replicate API", container=True)
|
81 |
+
prompt = gr.Text(label="Prompt", show_label=True, max_lines=4, show_copy_button = True, placeholder="Enter your prompt", container=True)
|
82 |
with gr.Accordion("Advanced Settings", open=False):
|
83 |
with gr.Row():
|
84 |
custom_lora = gr.Textbox(label="Custom LoRA", info="LoRA Hugging Face path (optional)", placeholder="multimodalart/vintage-ads-flux")
|
|
|
105 |
label="Guidance Scale",
|
106 |
minimum=1,
|
107 |
maximum=15,
|
108 |
+
step=0.01,
|
109 |
value=3.5,
|
110 |
)
|
111 |
num_inference_steps = gr.Slider(
|