Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,12 +21,12 @@ pipe = StableDiffusionPipeline.from_pretrained(model_path)
|
|
| 21 |
fixed_negative_prompt = "weird colors, low quality, jpeg artifacts, lowres, grainy, deformed structures, blurry, opaque, low contrast, distorted details, details are low"
|
| 22 |
|
| 23 |
|
| 24 |
-
|
| 25 |
# Function to generate images based on input text
|
| 26 |
|
| 27 |
def generate_image(prompt):
|
|
|
|
| 28 |
|
| 29 |
-
image = pipe(prompt=prompt, negative_prompt=fixed_negative_prompt, num_inference_steps=
|
| 30 |
|
| 31 |
return image
|
| 32 |
|
|
|
|
| 21 |
fixed_negative_prompt = "weird colors, low quality, jpeg artifacts, lowres, grainy, deformed structures, blurry, opaque, low contrast, distorted details, details are low"
|
| 22 |
|
| 23 |
|
|
|
|
| 24 |
# Function to generate images based on input text
|
| 25 |
|
| 26 |
def generate_image(prompt):
|
| 27 |
+
prompt += " , 8k, best quality, high-resolution"
|
| 28 |
|
| 29 |
+
image = pipe(prompt=prompt, negative_prompt=fixed_negative_prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
|
| 30 |
|
| 31 |
return image
|
| 32 |
|