Jackflack09 commited on
Commit
5d139de
·
1 Parent(s): 4838400

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -70,14 +70,11 @@ if is_colab:
70
 
71
  else:
72
  pipe = StableDiffusionPipeline.from_pretrained(
73
- current_model.path,
74
- torch_dtype=torch.float16,
75
- scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
76
- )
77
-
78
- if torch.cuda.is_available():
79
- pipe = pipe.to("cuda")
80
- pipe.enable_xformers_memory_efficient_attention()
81
 
82
  device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
83
 
 
70
 
71
  else:
72
  pipe = StableDiffusionPipeline.from_pretrained(
73
+ model_id,
74
+ revision="fp16" if torch.cuda.is_available() else "fp32",
75
+ torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
76
+ scheduler=scheduler
77
+ ).to("cuda")
 
 
 
78
 
79
  device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
80