MegaTronX commited on
Commit
3563a40
·
verified ·
1 Parent(s): 52d72cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -3,8 +3,12 @@ import gradio as gr
3
  from diffusers import DiffusionPipeline
4
  import torch
5
 
6
- pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
 
 
 
7
  pipe.load_lora_weights("MegaTronX/MetartLoRA", weight_name="MetartLoRA.safetensors")
 
8
 
9
  #@spaces.GPU
10
  def generate_image(prompt, num_inference_steps=25, guidance_scale=7.5, seed=None):
 
3
  from diffusers import DiffusionPipeline
4
  import torch
5
 
6
+ pipe = DiffusionPipeline.from_pretrained(
7
+ "black-forest-labs/FLUX.1-dev",
8
+ torch_dtype=torch.float16
9
+ )
10
  pipe.load_lora_weights("MegaTronX/MetartLoRA", weight_name="MetartLoRA.safetensors")
11
+ pipe = pipe.to("cuda")
12
 
13
  #@spaces.GPU
14
  def generate_image(prompt, num_inference_steps=25, guidance_scale=7.5, seed=None):