Spaces:
Runtime error
Runtime error
boheng.xie
commited on
Commit
·
eb0bc5a
1
Parent(s):
d275b36
change model for app
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ print(f"使用设备: {device}")
|
|
| 9 |
|
| 10 |
# 初始化模型(适配Space环境)
|
| 11 |
model = StableDiffusionPipeline.from_pretrained(
|
| 12 |
-
"
|
| 13 |
torch_dtype=torch.float16 if device == "cuda" else torch.float32,
|
| 14 |
use_safetensors=True,
|
| 15 |
safety_checker=None, # 根据需要可开启或关闭
|
|
|
|
| 9 |
|
| 10 |
# 初始化模型(适配Space环境)
|
| 11 |
model = StableDiffusionPipeline.from_pretrained(
|
| 12 |
+
"stabilityai/sd-turbo",
|
| 13 |
torch_dtype=torch.float16 if device == "cuda" else torch.float32,
|
| 14 |
use_safetensors=True,
|
| 15 |
safety_checker=None, # 根据需要可开启或关闭
|