Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
374e672
1
Parent(s):
0d23c84
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,9 @@ for item in sdxl_loras:
|
|
41 |
item["state_dict"] = state_dict #{k: v.to(device="cuda", dtype=torch.float16) for k, v in state_dict.items() if torch.is_tensor(v)}
|
42 |
|
43 |
css = '''
|
|
|
44 |
#title{text-align:center;}
|
|
|
45 |
#title h1{font-size: 250%}
|
46 |
.selected_random img{object-fit: cover}
|
47 |
.plus_column{align-self: center}
|
@@ -49,7 +51,7 @@ css = '''
|
|
49 |
#prompt input{width: calc(100% - 160px);border-top-right-radius: 0px;border-bottom-right-radius: 0px;}
|
50 |
#run_button{position:absolute;margin-top: 12px;right: 0;margin-right: 1.5em;border-bottom-left-radius: 0px;
|
51 |
border-top-left-radius: 0px;}
|
52 |
-
.random_column{align-self: center}
|
53 |
@media (max-width: 1024px) {
|
54 |
.roulette_group{flex-direction: column}
|
55 |
}
|
@@ -109,13 +111,13 @@ with gr.Blocks(css=css) as demo:
|
|
109 |
with gr.Column(min_width=10, scale=16, elem_classes="plus_column"):
|
110 |
gr.HTML("<p>This 2 random LoRAs are loaded to SDXL, find a fun way to combine them 🎨</p>")
|
111 |
with gr.Row():
|
112 |
-
with gr.Column(min_width=10, scale=
|
113 |
-
lora_1 = gr.Image(interactive=False, height=
|
114 |
lora_1_prompt = gr.Markdown(visible=False)
|
115 |
with gr.Column(min_width=10, scale=1, elem_classes="plus_column"):
|
116 |
plus = gr.HTML("+", elem_classes="plus_button")
|
117 |
-
with gr.Column(min_width=10, scale=
|
118 |
-
lora_2 = gr.Image(interactive=False, height=
|
119 |
lora_2_prompt = gr.Markdown(visible=False)
|
120 |
with gr.Column(min_width=10, scale=1, elem_classes="plus_column"):
|
121 |
equal = gr.HTML("=", elem_classes="plus_button")
|
|
|
41 |
item["state_dict"] = state_dict #{k: v.to(device="cuda", dtype=torch.float16) for k, v in state_dict.items() if torch.is_tensor(v)}
|
42 |
|
43 |
css = '''
|
44 |
+
.gradio-container{max-width: 650px}
|
45 |
#title{text-align:center;}
|
46 |
+
|
47 |
#title h1{font-size: 250%}
|
48 |
.selected_random img{object-fit: cover}
|
49 |
.plus_column{align-self: center}
|
|
|
51 |
#prompt input{width: calc(100% - 160px);border-top-right-radius: 0px;border-bottom-right-radius: 0px;}
|
52 |
#run_button{position:absolute;margin-top: 12px;right: 0;margin-right: 1.5em;border-bottom-left-radius: 0px;
|
53 |
border-top-left-radius: 0px;}
|
54 |
+
.random_column{align-self: center; align-items: center}
|
55 |
@media (max-width: 1024px) {
|
56 |
.roulette_group{flex-direction: column}
|
57 |
}
|
|
|
111 |
with gr.Column(min_width=10, scale=16, elem_classes="plus_column"):
|
112 |
gr.HTML("<p>This 2 random LoRAs are loaded to SDXL, find a fun way to combine them 🎨</p>")
|
113 |
with gr.Row():
|
114 |
+
with gr.Column(min_width=10, scale=4, elem_classes="random_column"):
|
115 |
+
lora_1 = gr.Image(interactive=False, height=150, elem_classes="selected_random")
|
116 |
lora_1_prompt = gr.Markdown(visible=False)
|
117 |
with gr.Column(min_width=10, scale=1, elem_classes="plus_column"):
|
118 |
plus = gr.HTML("+", elem_classes="plus_button")
|
119 |
+
with gr.Column(min_width=10, scale=4, elem_classes="random_column"):
|
120 |
+
lora_2 = gr.Image(interactive=False, height=150, elem_classes="selected_random")
|
121 |
lora_2_prompt = gr.Markdown(visible=False)
|
122 |
with gr.Column(min_width=10, scale=1, elem_classes="plus_column"):
|
123 |
equal = gr.HTML("=", elem_classes="plus_button")
|