Spaces:
Running
on
Zero
Running
on
Zero
rafaaa2105
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,14 +7,14 @@ from diffusers import DiffusionPipeline
|
|
7 |
import torch
|
8 |
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
-
model_repo_id = "stabilityai/sdxl-turbo" # Replace to the model you would like to use
|
11 |
|
12 |
if torch.cuda.is_available():
|
13 |
torch_dtype = torch.float16
|
14 |
else:
|
15 |
torch_dtype = torch.float32
|
16 |
|
17 |
-
pipe =
|
|
|
18 |
pipe = pipe.to(device)
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
7 |
import torch
|
8 |
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
10 |
|
11 |
if torch.cuda.is_available():
|
12 |
torch_dtype = torch.float16
|
13 |
else:
|
14 |
torch_dtype = torch.float32
|
15 |
|
16 |
+
pipe = pipeline = AutoPipelineForText2Image.from_pretrained("ostris/OpenFLUX.1", torch_dtype=torch.bfloat16)
|
17 |
+
pipe.load_lora_weights('aleksa-codes/flux-ghibsky-illustration', weight_name='lora.safetensors')
|
18 |
pipe = pipe.to(device)
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|