Spaces:
Runtime error
Runtime error
Commit
•
93e795a
1
Parent(s):
93a27e4
Update prompts and field titles
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ DEFAULT_NEGATIVE_PROMPT = ""
|
|
12 |
EXAMPLES = [
|
13 |
[
|
14 |
"examples/black-sneakers-with-white-sole.jpg",
|
15 |
-
"on
|
16 |
"people, litter, trash, crowds, messy",
|
17 |
],
|
18 |
[
|
@@ -22,23 +22,28 @@ EXAMPLES = [
|
|
22 |
],
|
23 |
[
|
24 |
"examples/dj-making-music-on-mixer.jpg",
|
25 |
-
"
|
26 |
-
"",
|
27 |
],
|
28 |
[
|
29 |
"examples/jean-shorts-woman.jpg",
|
30 |
-
"on the beach in Malibu, a five-star beachfront hotel in the background,
|
31 |
-
"",
|
32 |
],
|
33 |
]
|
34 |
|
35 |
INTRO = """
|
36 |
# SDXL Background Replacement for Product Images
|
37 |
-
_from your friends
|
38 |
|
39 |
Building an online store requires lots of high quality product and marketing images. This is an early demo of a background replacement tool built with Stable Diffusion XL that makes it easy to use your existing product images to make something new. Please be patient during peak demand. 😅
|
40 |
|
41 |
-
To use it, upload your product photo
|
|
|
|
|
|
|
|
|
|
|
42 |
"""
|
43 |
|
44 |
MORE_INFO = """
|
@@ -113,12 +118,12 @@ with gr.Blocks(css=custom_css) as iface:
|
|
113 |
with gr.Column(elem_id="params"):
|
114 |
with gr.Tab('Prompts'):
|
115 |
positive_prompt = gr.Textbox(
|
116 |
-
label="Positive Prompt
|
117 |
lines=3,
|
118 |
value=DEFAULT_POSITIVE_PROMPT
|
119 |
)
|
120 |
negative_prompt = gr.Textbox(
|
121 |
-
label="Negative Prompt
|
122 |
lines=3,
|
123 |
value=DEFAULT_NEGATIVE_PROMPT
|
124 |
)
|
|
|
12 |
EXAMPLES = [
|
13 |
[
|
14 |
"examples/black-sneakers-with-white-sole.jpg",
|
15 |
+
"on the grass in Central Park, gorgeous summer day with Bethesda fountain in the background, commercial footwear product photography",
|
16 |
"people, litter, trash, crowds, messy",
|
17 |
],
|
18 |
[
|
|
|
22 |
],
|
23 |
[
|
24 |
"examples/dj-making-music-on-mixer.jpg",
|
25 |
+
"on the turntables with a packed dance floor, epic midnight edm party in Miami Beach, colorful nightlife photography",
|
26 |
+
"disfigured, dismembered, mangled, marred",
|
27 |
],
|
28 |
[
|
29 |
"examples/jean-shorts-woman.jpg",
|
30 |
+
"on the beach in Malibu, a five-star beachfront hotel in the background, stark late afternoon light near the dunes, lifestyle photography",
|
31 |
+
"blurry background, ripples, soft focus, bokeh",
|
32 |
],
|
33 |
]
|
34 |
|
35 |
INTRO = """
|
36 |
# SDXL Background Replacement for Product Images
|
37 |
+
_from your friends at_ 🛍️[Shopify](https://www.shopify.com/)
|
38 |
|
39 |
Building an online store requires lots of high quality product and marketing images. This is an early demo of a background replacement tool built with Stable Diffusion XL that makes it easy to use your existing product images to make something new. Please be patient during peak demand. 😅
|
40 |
|
41 |
+
To use it, upload your product photo (.jpg or .png), then describe the background you’d like to see in place of the original. For best results follow the general pattern in the examples below:
|
42 |
+
1. ❌ _Do not_ describe your product in the prompt (ex: black sneakers)
|
43 |
+
2. ✅ Do describe the "grounding" for your product (ex: placed on a table)
|
44 |
+
3. ✅ Do describe the scene you want (ex: in a greek cottage)
|
45 |
+
4. ✅ Do describe a style of image (ex: side view commercial product photography)
|
46 |
+
5. 🤔 Optionally, describe what you want to avoid 🙅 in the negative prompt field
|
47 |
"""
|
48 |
|
49 |
MORE_INFO = """
|
|
|
118 |
with gr.Column(elem_id="params"):
|
119 |
with gr.Tab('Prompts'):
|
120 |
positive_prompt = gr.Textbox(
|
121 |
+
label="Positive Prompt: describe what you'd like to see",
|
122 |
lines=3,
|
123 |
value=DEFAULT_POSITIVE_PROMPT
|
124 |
)
|
125 |
negative_prompt = gr.Textbox(
|
126 |
+
label="Negative Prompt: describe what you want to avoid",
|
127 |
lines=3,
|
128 |
value=DEFAULT_NEGATIVE_PROMPT
|
129 |
)
|