wei
commited on
Commit
·
1471d3c
1
Parent(s):
d65a78a
float16
Browse files
app.py
CHANGED
@@ -7,14 +7,14 @@ import torch
|
|
7 |
|
8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
model_repo_id = "black-forest-labs/FLUX.1-schnell" #Replace to the model you would like to use
|
10 |
-
#enhanceaiteam/Flux-uncensored
|
11 |
|
12 |
if torch.cuda.is_available():
|
13 |
torch_dtype = torch.float16
|
14 |
else:
|
15 |
torch_dtype = torch.float32
|
16 |
|
17 |
-
pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=
|
|
|
18 |
pipe = pipe.to(device)
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
7 |
|
8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
model_repo_id = "black-forest-labs/FLUX.1-schnell" #Replace to the model you would like to use
|
|
|
10 |
|
11 |
if torch.cuda.is_available():
|
12 |
torch_dtype = torch.float16
|
13 |
else:
|
14 |
torch_dtype = torch.float32
|
15 |
|
16 |
+
pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch.float16)
|
17 |
+
pipe.unet.load_attn_procs("enhanceaiteam/Flux-uncensored-V2")
|
18 |
pipe = pipe.to(device)
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|