Tolga commited on
Commit
f99b561
1 Parent(s): 8db5529

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -12,8 +12,6 @@ import torch
12
  from diffusers import DiffusionPipeline
13
 
14
  DESCRIPTION = '# SD-XL'
15
- if not torch.cuda.is_available():
16
- DESCRIPTION += '\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>'
17
 
18
  MAX_SEED = np.iinfo(np.int32).max
19
  CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv(
@@ -28,8 +26,8 @@ if torch.cuda.is_available():
28
  pipe = DiffusionPipeline.from_pretrained(
29
  model,
30
  torch_dtype=torch.float16,
31
- use_safetensors=True,
32
  variant='fp16')
 
33
 
34
  refiner = DiffusionPipeline.from_pretrained(
35
  'stabilityai/stable-diffusion-xl-refiner-1.0',
 
12
  from diffusers import DiffusionPipeline
13
 
14
  DESCRIPTION = '# SD-XL'
 
 
15
 
16
  MAX_SEED = np.iinfo(np.int32).max
17
  CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv(
 
26
  pipe = DiffusionPipeline.from_pretrained(
27
  model,
28
  torch_dtype=torch.float16,
 
29
  variant='fp16')
30
+ pipe.load_lora_weights(model, weight_name="pytorch_lora_weights.safetensors")
31
 
32
  refiner = DiffusionPipeline.from_pretrained(
33
  'stabilityai/stable-diffusion-xl-refiner-1.0',