Spaces:
Running
on
Zero
Running
on
Zero
primecai
commited on
Commit
·
68c264b
1
Parent(s):
defd213
add token
Browse files
app.py
CHANGED
|
@@ -23,9 +23,16 @@ def init_pipeline():
|
|
| 23 |
use_auth_token=os.getenv("HF_TOKEN"),
|
| 24 |
)
|
| 25 |
pipe = FluxConditionalPipeline.from_pretrained(
|
| 26 |
-
"black-forest-labs/FLUX.1-dev",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
)
|
| 28 |
-
pipe.load_lora_weights(os.path.join(CHECKPOINT, "pytorch_lora_weights.safetensors"), use_auth_token=os.getenv("HF_TOKEN"))
|
| 29 |
pipe.to("cuda")
|
| 30 |
|
| 31 |
|
|
|
|
| 23 |
use_auth_token=os.getenv("HF_TOKEN"),
|
| 24 |
)
|
| 25 |
pipe = FluxConditionalPipeline.from_pretrained(
|
| 26 |
+
"black-forest-labs/FLUX.1-dev",
|
| 27 |
+
transformer=transformer,
|
| 28 |
+
torch_dtype=torch.bfloat16,
|
| 29 |
+
use_auth_token=os.getenv("HF_TOKEN"),
|
| 30 |
+
)
|
| 31 |
+
pipe.load_lora_weights(
|
| 32 |
+
pretrained_model_name_or_path="primecai/dsd_model",
|
| 33 |
+
weight_name="pytorch_lora_weights.safetensors",
|
| 34 |
+
use_auth_token=os.getenv("HF_TOKEN"),
|
| 35 |
)
|
|
|
|
| 36 |
pipe.to("cuda")
|
| 37 |
|
| 38 |
|