prithivMLmods commited on
Commit
70733b2
·
verified ·
1 Parent(s): c314fac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -162,7 +162,7 @@ def generate_image(input_image, prompt, selected_index, user_lora, seed=42, rand
162
  if lora_to_use and lora_to_use != active_lora_adapter:
163
  try:
164
  if active_lora_adapter:
165
- pipe разгрузить_веса_lora()
166
 
167
  lora_path = load_lora_weights(lora_to_use["repo"], lora_to_use["weights"])
168
  if lora_path:
@@ -241,12 +241,11 @@ css = """
241
  """
242
 
243
  # Build the Gradio interface
244
- with gr.Blocks(css=css) as demo:
245
  gr_lora_configs = gr.State(value=lora_configs)
246
 
247
  title = gr.HTML(
248
- """<h1>Image Style Transfer using FLUX.1 with Adapters</h1>
249
- <p>Edit images using custom style adapters. Fast generation with minimal steps.</p>""",
250
  )
251
 
252
  selected_state = gr.State(value=None)
 
162
  if lora_to_use and lora_to_use != active_lora_adapter:
163
  try:
164
  if active_lora_adapter:
165
+ pipe.unload_lora_weights()
166
 
167
  lora_path = load_lora_weights(lora_to_use["repo"], lora_to_use["weights"])
168
  if lora_path:
 
241
  """
242
 
243
  # Build the Gradio interface
244
+ with gr.Blocks(theme=gr.themes.Soft(), css=css, delete_cache=(60, 60)) as demo:
245
  gr_lora_configs = gr.State(value=lora_configs)
246
 
247
  title = gr.HTML(
248
+ """<h1>Flux Kontext DLC😍</h1>""",
 
249
  )
250
 
251
  selected_state = gr.State(value=None)