rafaaa2105 commited on
Commit
40822a4
1 Parent(s): a17e285

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import torch
2
- from diffusers import pipeline
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] = pipeline("text-to-image", model=model_name, torch_dtype=torch.float16).to("cuda")
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