Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
|
|
|
|
|
|
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):
|