Spaces:
Running
on
L4
Running
on
L4
Update app.py
Browse files
app.py
CHANGED
@@ -65,13 +65,28 @@ def generate(
|
|
65 |
progress=gr.Progress(track_tqdm=True),
|
66 |
):
|
67 |
|
68 |
-
"""
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
70 |
Args:
|
71 |
-
prompt:
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
Returns:
|
74 |
-
|
|
|
|
|
75 |
"""
|
76 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
77 |
|
|
|
65 |
progress=gr.Progress(track_tqdm=True),
|
66 |
):
|
67 |
|
68 |
+
"""
|
69 |
+
Generate an image from a text prompt using a fine-tuned Stable Diffusion XL model.
|
70 |
+
|
71 |
+
This function uses the Fluently-XL-Final model with a LoRA adapter (dalle-3-xl-v2)
|
72 |
+
to generate high-quality images based on the input prompt. It allows advanced options
|
73 |
+
such as negative prompts, seed control, image resolution, and classifier-free guidance scale.
|
74 |
+
|
75 |
Args:
|
76 |
+
prompt: A positive text prompt describing the desired image.
|
77 |
+
negative_prompt: A prompt specifying what should be avoided in the image (optional).
|
78 |
+
use_negative_prompt: Whether to use the negative prompt or ignore it.
|
79 |
+
seed: Seed value for reproducibility. Set to 0 if unused or randomize_seed is True.
|
80 |
+
width: Width of the output image (in pixels).
|
81 |
+
height: Height of the output image (in pixels).
|
82 |
+
guidance_scale: Classifier-free guidance scale to control prompt adherence.
|
83 |
+
randomize_seed: If True, a random seed will be used.
|
84 |
+
progress: Gradio progress tracker (automatically handled by Gradio UI).
|
85 |
+
|
86 |
Returns:
|
87 |
+
A tuple containing:
|
88 |
+
- A list with one file path to the saved generated image.
|
89 |
+
- The seed used for generation (useful for reproducibility).
|
90 |
"""
|
91 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
92 |
|