Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,14 +17,26 @@ def infer(
|
|
| 17 |
width,
|
| 18 |
height,
|
| 19 |
guidance_scale,
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
):
|
| 23 |
if randomize_seed:
|
| 24 |
seed = random.randint(0, MAX_SEED)
|
| 25 |
|
| 26 |
|
| 27 |
-
with Blossom(api_token="
|
| 28 |
image_data = client.image.generate(
|
| 29 |
# Required
|
| 30 |
prompt=prompt,
|
|
@@ -153,10 +165,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 153 |
width,
|
| 154 |
height,
|
| 155 |
guidance_scale,
|
| 156 |
-
|
| 157 |
],
|
| 158 |
outputs=[result, seed],
|
| 159 |
)
|
| 160 |
|
| 161 |
if __name__ == "__main__":
|
| 162 |
-
demo.launch()
|
|
|
|
| 17 |
width,
|
| 18 |
height,
|
| 19 |
guidance_scale,
|
| 20 |
+
# Enhancement
|
| 21 |
+
enhance=True, # Auto-enhance prompt (default: False)
|
| 22 |
+
|
| 23 |
+
# Special Features
|
| 24 |
+
transparent=False, # Transparent background (default: False)
|
| 25 |
+
image=None, # Input image URL for img2img
|
| 26 |
+
|
| 27 |
+
# Privacy
|
| 28 |
+
private=False, # Private generation (default: False)
|
| 29 |
+
nologo=False, # Remove watermark (default: False)
|
| 30 |
+
nofeed=False, # Don't add to public feed (default: False)
|
| 31 |
+
safe=False
|
| 32 |
+
|
| 33 |
+
|
| 34 |
):
|
| 35 |
if randomize_seed:
|
| 36 |
seed = random.randint(0, MAX_SEED)
|
| 37 |
|
| 38 |
|
| 39 |
+
with Blossom(api_token="plln_pk_4nTWyhB9jsRLpArBT2BNPgdmxE0tVN3G") as client:
|
| 40 |
image_data = client.image.generate(
|
| 41 |
# Required
|
| 42 |
prompt=prompt,
|
|
|
|
| 165 |
width,
|
| 166 |
height,
|
| 167 |
guidance_scale,
|
| 168 |
+
|
| 169 |
],
|
| 170 |
outputs=[result, seed],
|
| 171 |
)
|
| 172 |
|
| 173 |
if __name__ == "__main__":
|
| 174 |
+
demo.launch(mcp_server=True)
|