Spaces:
Runtime error
Runtime error
harshasoftware
commited on
Commit
•
95e2f43
1
Parent(s):
f4f4941
Update app.py
Browse files
app.py
CHANGED
@@ -5,12 +5,21 @@ from PIL import Image
|
|
5 |
import io
|
6 |
from huggingface_hub import login
|
7 |
import os
|
|
|
|
|
8 |
|
9 |
# Authenticate with Hugging Face
|
10 |
login(token=os.environ.get('your_huggingface_token_here'))
|
11 |
|
12 |
# Load the Stable Fast 3D model
|
|
|
13 |
model_id = "stabilityai/stable-fast-3d"
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
15 |
pipe = pipe.to("cuda")
|
16 |
|
|
|
5 |
import io
|
6 |
from huggingface_hub import login
|
7 |
import os
|
8 |
+
from huggingface_hub import hf_hub_download
|
9 |
+
|
10 |
|
11 |
# Authenticate with Hugging Face
|
12 |
login(token=os.environ.get('your_huggingface_token_here'))
|
13 |
|
14 |
# Load the Stable Fast 3D model
|
15 |
+
# Try to download the model config to see if you have access
|
16 |
model_id = "stabilityai/stable-fast-3d"
|
17 |
+
try:
|
18 |
+
config_file = hf_hub_download(repo_id=model_id, filename="config.json")
|
19 |
+
print("Successfully accessed the model!")
|
20 |
+
except Exception as e:
|
21 |
+
print(f"Error accessing the model: {e}")
|
22 |
+
|
23 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
24 |
pipe = pipe.to("cuda")
|
25 |
|