Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ pipe = PixArtSigmaPipeline.from_pretrained(
|
|
| 23 |
)
|
| 24 |
pipe.to(device)
|
| 25 |
|
| 26 |
-
@spaces.GPU(duration=
|
| 27 |
def generate(prompt, negative_prompt, num_inference_steps, guidance_scale, height, width):
|
| 28 |
image = pipe(
|
| 29 |
prompt,
|
|
@@ -40,14 +40,19 @@ interface = gr.Interface(
|
|
| 40 |
inputs=[
|
| 41 |
gr.Text(label="Prompt"),
|
| 42 |
gr.Text(label="Negative Prompt"),
|
| 43 |
-
gr.Slider(minimum=
|
| 44 |
-
gr.Slider(minimum=1, maximum=20, value=
|
| 45 |
-
gr.Slider(minimum=64, maximum=1024, value=
|
| 46 |
-
gr.Slider(minimum=64, maximum=1024, value=
|
| 47 |
],
|
| 48 |
outputs=gr.Image(label="Generated Image"),
|
| 49 |
title="PixArt Sigma Image Generation",
|
| 50 |
-
description="Generate images using the
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
)
|
| 52 |
|
| 53 |
interface.launch()
|
|
|
|
| 23 |
)
|
| 24 |
pipe.to(device)
|
| 25 |
|
| 26 |
+
@spaces.GPU(duration=90)
|
| 27 |
def generate(prompt, negative_prompt, num_inference_steps, guidance_scale, height, width):
|
| 28 |
image = pipe(
|
| 29 |
prompt,
|
|
|
|
| 40 |
inputs=[
|
| 41 |
gr.Text(label="Prompt"),
|
| 42 |
gr.Text(label="Negative Prompt"),
|
| 43 |
+
gr.Slider(minimum=10, maximum=100, value=30, step=1, label="Number of Inference Steps"),
|
| 44 |
+
gr.Slider(minimum=1, maximum=20, value=6, step=0.1, label="Guidance Scale"),
|
| 45 |
+
gr.Slider(minimum=64, maximum=1024, value=1024, step=64, label="Height"),
|
| 46 |
+
gr.Slider(minimum=64, maximum=1024, value=1024, step=64, label="Width"),
|
| 47 |
],
|
| 48 |
outputs=gr.Image(label="Generated Image"),
|
| 49 |
title="PixArt Sigma Image Generation",
|
| 50 |
+
description="""Generate high-fidelity 4K images from text prompts using PixArt-Sigma, a state-of-the-art diffusion model.
|
| 51 |
+
|
| 52 |
+
PixArt-Sigma achieves superior image quality and alignment with prompts compared to previous models like [PixArt-alpha](https://github.com/PixArt-alpha/PixArt-sigma). It does so efficiently, evolving from PixArt-alpha through a process termed weak-to-strong training - leveraging higher quality data and an improved attention mechanism.
|
| 53 |
+
|
| 54 |
+
With just 0.6 billion parameters, PixArt-Sigma reaches new heights in text-to-image generation. Output stunning, intricate 4K images for posters, wallpapers, concept art, and more. Guide the model with descriptive prompts and fine-tune parameters like guidance scale and number of inference steps.
|
| 55 |
+
""",
|
| 56 |
)
|
| 57 |
|
| 58 |
interface.launch()
|