JacobLinCool commited on
Commit
45bb589
1 Parent(s): 8023793

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -9,10 +9,12 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
9
  if torch.cuda.is_available():
10
  torch.cuda.max_memory_allocated(device=device)
11
  pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
12
- pipe.enable_xformers_memory_efficient_attention()
 
13
  pipe = pipe.to(device)
14
  else:
15
  pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", use_safetensors=True)
 
16
  pipe = pipe.to(device)
17
 
18
  MAX_SEED = np.iinfo(np.int32).max
@@ -84,6 +86,7 @@ with gr.Blocks(css=css) as demo:
84
  max_lines=1,
85
  placeholder="Enter a negative prompt",
86
  visible=False,
 
87
  )
88
 
89
  seed = gr.Slider(
 
9
  if torch.cuda.is_available():
10
  torch.cuda.max_memory_allocated(device=device)
11
  pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
12
+ pipe.load_lora_weights("JacobLinCool/sdxl-lora-gdsc-1")
13
+ # pipe.enable_xformers_memory_efficient_attention()
14
  pipe = pipe.to(device)
15
  else:
16
  pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", use_safetensors=True)
17
+ pipe.load_lora_weights("JacobLinCool/sdxl-lora-gdsc-1")
18
  pipe = pipe.to(device)
19
 
20
  MAX_SEED = np.iinfo(np.int32).max
 
86
  max_lines=1,
87
  placeholder="Enter a negative prompt",
88
  visible=False,
89
+ value="",
90
  )
91
 
92
  seed = gr.Slider(