Spaces:
Running
on
Zero
Running
on
Zero
update interface
Browse files
app.py
CHANGED
@@ -105,59 +105,33 @@ css="""
|
|
105 |
"""
|
106 |
|
107 |
with gr.Blocks(css=css) as demo:
|
108 |
-
|
109 |
-
with gr.
|
110 |
-
gr.Markdown(f"""
|
111 |
-
# Simple flux with lora
|
112 |
-
""")
|
113 |
|
114 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
label="Repo",
|
128 |
-
max_lines=1,
|
129 |
-
placeholder="Enter a lora repo",
|
130 |
-
visible=False,
|
131 |
-
)
|
132 |
-
|
133 |
-
lora_name = gr.Text(
|
134 |
-
label="Weights",
|
135 |
-
max_lines=1,
|
136 |
-
placeholder="Enter a lora weights",
|
137 |
-
visible=False,
|
138 |
-
)
|
139 |
-
run_button = gr.Button("Run", scale=0)
|
140 |
-
|
141 |
-
with gr.Accordion("Advanced Settings", open=False):
|
142 |
-
|
143 |
-
with gr.Row():
|
144 |
-
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
145 |
-
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
146 |
-
lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=3, step=0.01, value=0.95)
|
147 |
-
|
148 |
-
with gr.Row():
|
149 |
-
width = gr.Slider(label="Width", minimum=256, maximum=1536, step=64, value=1024)
|
150 |
-
height = gr.Slider(label="Height", minimum=256, maximum=1536, step=64, value=1024)
|
151 |
-
|
152 |
-
with gr.Row():
|
153 |
-
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, step=0.5, value=3.5)
|
154 |
-
steps = gr.Slider(label="Steps", minimum=1, maximum=50, step=1, value=28)
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
with gr.Row():
|
159 |
-
progress_bar = gr.Markdown(elem_id="progress",visible=False)
|
160 |
-
result = gr.Image(label="Result", show_label=False)
|
161 |
|
162 |
gr.on(
|
163 |
triggers=[run_button.click, prompt.submit],
|
|
|
105 |
"""
|
106 |
|
107 |
with gr.Blocks(css=css) as demo:
|
108 |
+
gr.Markdown("Flux with lora")
|
109 |
+
with gr.Row():
|
|
|
|
|
|
|
110 |
|
111 |
with gr.Column():
|
112 |
+
prompt = gr.Text(label="Prompt", show_label=False, max_lines=1, placeholder="Enter your prompt", container=False)
|
113 |
+
lora_repo = gr.Text( label="Repo", max_lines=1, placeholder="Enter a lora repo", visible=True)
|
114 |
+
lora_name = gr.Text( label="Weights", max_lines=1, placeholder="Enter a lora weights",visible=True)
|
115 |
+
run_button = gr.Button("Run", scale=0)
|
116 |
+
|
117 |
+
with gr.Accordion("Advanced Settings", open=False):
|
118 |
+
|
119 |
+
with gr.Row():
|
120 |
+
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
121 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
122 |
+
lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=3, step=0.01, value=0.95)
|
123 |
|
124 |
+
with gr.Row():
|
125 |
+
width = gr.Slider(label="Width", minimum=256, maximum=1536, step=64, value=1024)
|
126 |
+
height = gr.Slider(label="Height", minimum=256, maximum=1536, step=64, value=1024)
|
127 |
+
|
128 |
+
with gr.Row():
|
129 |
+
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, step=0.5, value=3.5)
|
130 |
+
steps = gr.Slider(label="Steps", minimum=1, maximum=50, step=1, value=28)
|
131 |
+
|
132 |
+
with gr.Column():
|
133 |
+
progress_bar = gr.Markdown(elem_id="progress",visible=False)
|
134 |
+
result = gr.Image(label="Result", show_label=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
gr.on(
|
137 |
triggers=[run_button.click, prompt.submit],
|