Files changed (1) hide show
  1. app.py +28 -1
app.py CHANGED
@@ -31,7 +31,7 @@ pipeline.load_lora_weights(lora_weights_path)
31
  pipeline = pipeline.to(device)
32
 
33
  MAX_SEED = np.iinfo(np.int32).max
34
- MAX_IMAGE_SIZE = 768 # Reduce max image size to fit within memory constraints
35
 
36
  @spaces.GPU
37
  def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
@@ -104,6 +104,28 @@ body {
104
  border-radius: 8px;
105
  margin-top: 20px;
106
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  """
108
 
109
  if torch.cuda.is_available():
@@ -118,6 +140,11 @@ with gr.Blocks(css=css) as demo:
118
  Currently running on {power_device}.
119
  """)
120
 
 
 
 
 
 
121
  with gr.Row():
122
  prompt = gr.Textbox(
123
  label="Prompt",
 
31
  pipeline = pipeline.to(device)
32
 
33
  MAX_SEED = np.iinfo(np.int32).max
34
+ MAX_IMAGE_SIZE = 1024 # Reduce max image size to fit within memory constraints
35
 
36
  @spaces.GPU
37
  def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
 
104
  border-radius: 8px;
105
  margin-top: 20px;
106
  }
107
+
108
+ .color-block {
109
+ height: 100px;
110
+ width: 100%;
111
+ margin-bottom: 10px;
112
+ }
113
+
114
+ .color-block-pink {
115
+ background-color: #ff3f6c;
116
+ }
117
+
118
+ .color-block-blue {
119
+ background-color: #3498db;
120
+ }
121
+
122
+ .color-block-green {
123
+ background-color: #2ecc71;
124
+ }
125
+
126
+ .color-block-yellow {
127
+ background-color: #f1c40f;
128
+ }
129
  """
130
 
131
  if torch.cuda.is_available():
 
140
  Currently running on {power_device}.
141
  """)
142
 
143
+ gr.HTML("<div class='color-block color-block-pink'></div>")
144
+ gr.HTML("<div class='color-block color-block-blue'></div>")
145
+ gr.HTML("<div class='color-block color-block-green'></div>")
146
+ gr.HTML("<div class='color-block color-block-yellow'></div>")
147
+
148
  with gr.Row():
149
  prompt = gr.Textbox(
150
  label="Prompt",