Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
367a8ed
1
Parent(s):
5185e9f
Update TangoFlux.py
Browse files- TangoFlux.py +4 -3
TangoFlux.py
CHANGED
@@ -19,16 +19,17 @@ import json
|
|
19 |
import inspect
|
20 |
import yaml
|
21 |
from safetensors.torch import load_file
|
22 |
-
|
|
|
23 |
|
24 |
class TangoFluxInference:
|
25 |
|
26 |
def __init__(self,name='declare-lab/TangoFlux',device="cuda"):
|
27 |
|
28 |
|
29 |
-
self.vae = AutoencoderOobleck.from_pretrained("stabilityai/stable-audio-open-1.0",subfolder='vae')
|
30 |
|
31 |
-
paths = snapshot_download(repo_id=name)
|
32 |
weights = load_file("{}/tangoflux.safetensors".format(paths))
|
33 |
|
34 |
with open('{}/config.json'.format(paths),'r') as f:
|
|
|
19 |
import inspect
|
20 |
import yaml
|
21 |
from safetensors.torch import load_file
|
22 |
+
import os
|
23 |
+
print(os.environ['HOME'])
|
24 |
|
25 |
class TangoFluxInference:
|
26 |
|
27 |
def __init__(self,name='declare-lab/TangoFlux',device="cuda"):
|
28 |
|
29 |
|
30 |
+
self.vae = AutoencoderOobleck.from_pretrained("stabilityai/stable-audio-open-1.0",subfolder='vae',token=os.environ['HF_TOKEN'])
|
31 |
|
32 |
+
paths = snapshot_download(repo_id=name,token=os.environ['HF_TOKEN'])
|
33 |
weights = load_file("{}/tangoflux.safetensors".format(paths))
|
34 |
|
35 |
with open('{}/config.json'.format(paths),'r') as f:
|