Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,14 +16,9 @@ from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_
|
|
| 16 |
from huggingface_hub import HfFileSystem, ModelCard
|
| 17 |
from safetensors.torch import load_file
|
| 18 |
from huggingface_hub import login
|
| 19 |
-
from pathlib import Path as path
|
| 20 |
|
| 21 |
hf_token = os.environ.get("HF_TOKEN")
|
| 22 |
login(token=hf_token)
|
| 23 |
-
cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
| 24 |
-
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
| 25 |
-
os.environ["HF_HUB_CACHE"] = cache_path
|
| 26 |
-
os.environ["HF_HOME"] = cache_path
|
| 27 |
|
| 28 |
torch.set_float32_matmul_precision("medium")
|
| 29 |
|
|
|
|
| 16 |
from huggingface_hub import HfFileSystem, ModelCard
|
| 17 |
from safetensors.torch import load_file
|
| 18 |
from huggingface_hub import login
|
|
|
|
| 19 |
|
| 20 |
hf_token = os.environ.get("HF_TOKEN")
|
| 21 |
login(token=hf_token)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
torch.set_float32_matmul_precision("medium")
|
| 24 |
|