philipp-zettl commited on
Commit
e845246
1 Parent(s): 6f140da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,10 +1,14 @@
1
  import gradio as gr
2
  import spaces
 
3
  from diffusers import DiffusionPipeline
4
 
5
 
6
  model_name = 'UnfilteredAI/NSFW-gen-v2'
7
- pipe = DiffusionPipeline.from_pretrained(model_name)
 
 
 
8
  pipe.to('cuda')
9
 
10
  @spaces.GPU
 
1
  import gradio as gr
2
  import spaces
3
+ import torch
4
  from diffusers import DiffusionPipeline
5
 
6
 
7
  model_name = 'UnfilteredAI/NSFW-gen-v2'
8
+ pipe = DiffusionPipeline.from_pretrained(
9
+ model_name,
10
+ torch_dtype=torch.float16
11
+ )
12
  pipe.to('cuda')
13
 
14
  @spaces.GPU