Spaces:
Sleeping
Sleeping
rafaaa2105
commited on
Commit
•
40822a4
1
Parent(s):
a17e285
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import torch
|
2 |
-
from diffusers import
|
3 |
import gradio as gr
|
4 |
import os
|
5 |
import spaces
|
@@ -10,7 +10,7 @@ lora_list = os.environ.get("LORAS") # Not in use
|
|
10 |
models = {}
|
11 |
for model_name in model_list:
|
12 |
try:
|
13 |
-
models[model_name] =
|
14 |
except Exception as e:
|
15 |
print(f"Error loading model {model_name}: {e}")
|
16 |
|
|
|
1 |
import torch
|
2 |
+
from diffusers import DiffusionPipeline
|
3 |
import gradio as gr
|
4 |
import os
|
5 |
import spaces
|
|
|
10 |
models = {}
|
11 |
for model_name in model_list:
|
12 |
try:
|
13 |
+
models[model_name] = DiffusionPipeline.from_pretrained(model_name).to("cuda")
|
14 |
except Exception as e:
|
15 |
print(f"Error loading model {model_name}: {e}")
|
16 |
|