alfredplpl commited on
Commit
98286a3
·
1 Parent(s): 40104c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -13,13 +13,15 @@ feature_extractor = CLIPFeatureExtractor.from_pretrained(model_id)
13
 
14
  pipe = StableDiffusionPipeline.from_pretrained(
15
  model_id,
16
- torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
 
17
  scheduler=scheduler)
18
- #pipe.enable_xformers_memory_efficient_attention()
19
 
20
  pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
21
  model_id,
22
- torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
 
23
  scheduler=scheduler,
24
  requires_safety_checker=False,
25
  safety_checker=None,
 
13
 
14
  pipe = StableDiffusionPipeline.from_pretrained(
15
  model_id,
16
+ #torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
17
+ torch_dtype=torch.float16,
18
  scheduler=scheduler)
19
+ pipe.enable_xformers_memory_efficient_attention()
20
 
21
  pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
22
  model_id,
23
+ #torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
24
+ torch_dtype=torch.float16,
25
  scheduler=scheduler,
26
  requires_safety_checker=False,
27
  safety_checker=None,