Spaces:
Runtime error
Runtime error
fix requirement
Browse files
app.py
CHANGED
@@ -17,13 +17,13 @@ import intel_extension_for_pytorch as ipex
|
|
17 |
import os
|
18 |
from os.path import join as opj
|
19 |
|
20 |
-
|
21 |
-
|
22 |
|
23 |
from stablegarment.models import GarmentEncoderModel,ControlNetModel
|
24 |
from stablegarment.piplines import StableGarmentPipeline,StableGarmentControlNetPipeline
|
25 |
|
26 |
-
device = "
|
27 |
torch_dtype = torch.bfloat16 if device=="cpu" else torch.float16
|
28 |
height = 512
|
29 |
width = 384
|
|
|
17 |
import os
|
18 |
from os.path import join as opj
|
19 |
|
20 |
+
token = os.getenv("ACCESS_TOKEN")
|
21 |
+
os.system(f"python -m pip install git+https://{token}@github.com/logn-2024/StableGarment.git")
|
22 |
|
23 |
from stablegarment.models import GarmentEncoderModel,ControlNetModel
|
24 |
from stablegarment.piplines import StableGarmentPipeline,StableGarmentControlNetPipeline
|
25 |
|
26 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
27 |
torch_dtype = torch.bfloat16 if device=="cpu" else torch.float16
|
28 |
height = 512
|
29 |
width = 384
|