Spaces:
Runtime error
Runtime error
RoniFinTech
commited on
Commit
•
8e97e43
1
Parent(s):
6785173
structure
Browse files
routers/intference/stable_diffusion.py
CHANGED
@@ -40,7 +40,7 @@ async def generate(prompt: str):
|
|
40 |
high_noise_frac = 0.8
|
41 |
negative = "disfigured, ugly, bad, immature, cartoon, anime, 3d, painting, b&w, sketch, blurry, deformed, bad anatomy, poorly drawn face, mutation, multiple people."
|
42 |
|
43 |
-
prompt = f"
|
44 |
print(prompt)
|
45 |
# "drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly. bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, disgusting, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blurry, mutated hands and fingers, watermark, watermarked, oversaturated, censored, distorted hands, amputation, missing hands, obese, doubled face, double hands, two women, anime style, cartoon, toon. multiple people."
|
46 |
# prompt = "Designs should play with different textures and layering but stick to a monochrome palette. Think leather jackets over mesh tops, or satin draped over matte cotton. in a studio. zoomed-in."
|
@@ -61,12 +61,6 @@ async def generate(prompt: str):
|
|
61 |
image=image,
|
62 |
).images[0]
|
63 |
|
64 |
-
# buffer = BytesIO()
|
65 |
-
# final_image.save(buffer, format="PNG")
|
66 |
-
# image_bytes = buffer.getvalue()
|
67 |
-
#
|
68 |
-
# return StreamingResponse(BytesIO(image_bytes), media_type="image/png")
|
69 |
-
#
|
70 |
memory_stream = BytesIO()
|
71 |
final_image.save(memory_stream, format="PNG")
|
72 |
memory_stream.seek(0)
|
|
|
40 |
high_noise_frac = 0.8
|
41 |
negative = "disfigured, ugly, bad, immature, cartoon, anime, 3d, painting, b&w, sketch, blurry, deformed, bad anatomy, poorly drawn face, mutation, multiple people."
|
42 |
|
43 |
+
prompt = f"single image. single model. {prompt}. zoomed in. full-body. real person. realistic. 4k. best quality."
|
44 |
print(prompt)
|
45 |
# "drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly. bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, disgusting, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blurry, mutated hands and fingers, watermark, watermarked, oversaturated, censored, distorted hands, amputation, missing hands, obese, doubled face, double hands, two women, anime style, cartoon, toon. multiple people."
|
46 |
# prompt = "Designs should play with different textures and layering but stick to a monochrome palette. Think leather jackets over mesh tops, or satin draped over matte cotton. in a studio. zoomed-in."
|
|
|
61 |
image=image,
|
62 |
).images[0]
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
memory_stream = BytesIO()
|
65 |
final_image.save(memory_stream, format="PNG")
|
66 |
memory_stream.seek(0)
|