Spaces:
Runtime error
Runtime error
fix
Browse files
app.py
CHANGED
|
@@ -17,9 +17,10 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
| 17 |
from huggingface_hub import login
|
| 18 |
login(token=os.environ.get('hf'))
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
pipeline.
|
|
|
|
| 23 |
|
| 24 |
def ensure_dirname(path: str):
|
| 25 |
if path and not os.path.exists(path):
|
|
|
|
| 17 |
from huggingface_hub import login
|
| 18 |
login(token=os.environ.get('hf'))
|
| 19 |
|
| 20 |
+
dtype = torch.bfloat16
|
| 21 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 22 |
+
pipeline = QwenImageLayeredPipeline.from_pretrained("Qwen/Qwen-Image-Layered", torch_dtype=dtype).to(device)
|
| 23 |
+
# pipeline.set_progress_bar_config(disable=None)
|
| 24 |
|
| 25 |
def ensure_dirname(path: str):
|
| 26 |
if path and not os.path.exists(path):
|