CJHauser commited on
Commit
814ebca
·
verified ·
1 Parent(s): eec010b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -14,14 +14,18 @@ if torch.cuda.is_available():
14
  else:
15
  torch_dtype = torch.float32
16
 
17
- pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
 
 
 
 
18
  pipe = pipe.to(device)
19
 
20
  MAX_SEED = np.iinfo(np.int32).max
21
  MAX_IMAGE_SIZE = 1024
22
 
23
 
24
- # @spaces.GPU #[uncomment to use ZeroGPU]
25
  def infer(
26
  prompt,
27
  negative_prompt,
 
14
  else:
15
  torch_dtype = torch.float32
16
 
17
+ pipe = DiffusionPipeline.from_pretrained(
18
+ model_repo_id,
19
+ torch_dtype=torch_dtype,
20
+ safety_checker=None # Disable safety checker
21
+ )
22
  pipe = pipe.to(device)
23
 
24
  MAX_SEED = np.iinfo(np.int32).max
25
  MAX_IMAGE_SIZE = 1024
26
 
27
 
28
+ @spaces.GPU #[uncomment to use ZeroGPU]
29
  def infer(
30
  prompt,
31
  negative_prompt,