ysharma HF Staff commited on
Commit
c7c0f6a
·
verified ·
1 Parent(s): 1ddb035

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -5
app.py CHANGED
@@ -65,13 +65,28 @@ def generate(
65
  progress=gr.Progress(track_tqdm=True),
66
  ):
67
 
68
- """generate an image for the given text prompt.
69
-
 
 
 
 
 
70
  Args:
71
- prompt: The input text to describe the image
72
-
 
 
 
 
 
 
 
 
73
  Returns:
74
- list of images with lenghth one
 
 
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