AlekseyCalvin commited on
Commit
27a7c47
1 Parent(s): 7f6c20a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,7 +9,7 @@ from PIL import Image
9
  from diffusers import DiffusionPipeline
10
 
11
  # Define the device
12
- device = "cuda" if torch.cuda.is_available() else "cpu"
13
 
14
  # Use the 'waffles' environment variable as the access token
15
  hf_token = os.getenv('waffles')
@@ -92,7 +92,7 @@ def run_lora(prompt, cfg_scale, steps, selected_repo, randomize_seed, seed, widt
92
  seed = random.randint(0, MAX_SEED)
93
 
94
  images = generate_images(prompt, trigger_word, steps, seed, cfg_scale, width, height, lora_scale, num_images, progress)
95
- pipe.to("cpu")
96
  pipe.unload_lora_weights()
97
  return images, seed
98
 
@@ -125,7 +125,7 @@ css = '''
125
  '''
126
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
127
  title = gr.HTML(
128
- """<h1><img src="https://huggingface.co/spaces/multimodalart/flux-lora-the-explorer/resolve/main/flux_lora.png" alt="LoRA"> FLUX LoRA the Explorer</h1>""",
129
  elem_id="title",
130
  )
131
 
 
9
  from diffusers import DiffusionPipeline
10
 
11
  # Define the device
12
+ device = "cuda"
13
 
14
  # Use the 'waffles' environment variable as the access token
15
  hf_token = os.getenv('waffles')
 
92
  seed = random.randint(0, MAX_SEED)
93
 
94
  images = generate_images(prompt, trigger_word, steps, seed, cfg_scale, width, height, lora_scale, num_images, progress)
95
+ pipe.to("cuda")
96
  pipe.unload_lora_weights()
97
  return images, seed
98
 
 
125
  '''
126
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
127
  title = gr.HTML(
128
+ """<h1><img src="https://huggingface.co/spaces/multimodalart/flux-lora-the-explorer/resolve/main/flux_lora.png" alt="LoRA"> SOONFACTORY over FLUX Schell LoRAs</h1>""",
129
  elem_id="title",
130
  )
131