Spaces:
Running on Zero
Running on Zero
Use sys.path for bundled diffusers
Browse files
app.py
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
import os
|
|
|
|
|
|
|
| 2 |
os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True")
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
import random
|
| 5 |
|
| 6 |
import spaces
|
|
|
|
| 1 |
import os
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True")
|
| 5 |
|
| 6 |
+
# Use the bundled diffusers source (PR #2: huggingface/diffusers-new-model-addition-ideogram).
|
| 7 |
+
_HERE = os.path.dirname(os.path.abspath(__file__))
|
| 8 |
+
sys.path.insert(0, os.path.join(_HERE, "diffusers_src", "src"))
|
| 9 |
+
|
| 10 |
import random
|
| 11 |
|
| 12 |
import spaces
|