Update app.py
Browse files
app.py
CHANGED
@@ -151,31 +151,18 @@ def generate_image(
|
|
151 |
img = Image.fromarray((127.5 * (x + 1.0)).cpu().byte().numpy())
|
152 |
return img, str(opts.seed), flux_generator.pulid_model.debug_img_list
|
153 |
|
154 |
-
_HEADER_ = '''
|
155 |
-
<div style="text-align: center; max-width: 650px; margin: 0 auto;">
|
156 |
-
<h1 style="font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; display: contents;">PuLID for FLUX</h1>
|
157 |
-
<p style="font-size: 1rem; margin-bottom: 1.5rem;">Paper: <a href='https://arxiv.org/abs/2404.16022' target='_blank'>PuLID: Pure and Lightning ID Customization via Contrastive Alignment</a> | Codes: <a href='https://github.com/ToTheBeginning/PuLID' target='_blank'>GitHub</a></p>
|
158 |
-
</div>
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
''' # noqa E501
|
166 |
-
|
167 |
-
_CITE_ = r"""
|
168 |
-
If PuLID is helpful, please help to ⭐ the <a href='https://github.com/ToTheBeginning/PuLID' target='_blank'> Github Repo</a>. Thanks!
|
169 |
-
---
|
170 |
-
|
171 |
-
📧 **Contact**
|
172 |
-
If you have any questions or feedbacks, feel free to open a discussion or contact <b>[email protected]</b>.
|
173 |
-
""" # noqa E501
|
174 |
|
175 |
|
176 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
177 |
offload: bool = False):
|
178 |
-
|
|
|
179 |
gr.Markdown(_HEADER_)
|
180 |
|
181 |
with gr.Row():
|
|
|
151 |
img = Image.fromarray((127.5 * (x + 1.0)).cpu().byte().numpy())
|
152 |
return img, str(opts.seed), flux_generator.pulid_model.debug_img_list
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
+
css = """
|
156 |
+
footer {
|
157 |
+
visibility: hidden;
|
158 |
+
}
|
159 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
|
162 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
163 |
offload: bool = False):
|
164 |
+
|
165 |
+
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
166 |
gr.Markdown(_HEADER_)
|
167 |
|
168 |
with gr.Row():
|