michaelj commited on
Commit
0e6a64b
1 Parent(s): 518c031

adapter_id = "latent-consistency/lcm-lora-sdxl"

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -8,11 +8,13 @@ from PIL import Image
8
  from diffusers import AutoPipelineForImage2Image
9
  from diffusers.utils import load_image
10
  import math
 
11
 
12
  device = "cuda" if torch.cuda.is_available() else "cpu"
13
- pipe = AutoPipelineForImage2Image.from_pretrained("ostris/objective-reality", torch_dtype=torch.float16) if torch.cuda.is_available() else AutoPipelineForImage2Image.from_pretrained("stabilityai/sdxl-turbo")
14
  pipe = pipe.to(device)
15
-
 
16
  def resize(value,img):
17
  img = Image.open(img)
18
  img = img.resize((value,value))
 
8
  from diffusers import AutoPipelineForImage2Image
9
  from diffusers.utils import load_image
10
  import math
11
+ adapter_id = "latent-consistency/lcm-lora-sdxl"
12
 
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
+ pipe = AutoPipelineForImage2Image.from_pretrained("Lykon/dreamshaper-xl-v2-turbo", torch_dtype=torch.float16) if torch.cuda.is_available() else AutoPipelineForImage2Image.from_pretrained("stabilityai/sdxl-turbo")
15
  pipe = pipe.to(device)
16
+ pipe.load_lora_weights(adapter_id)
17
+ pipe.fuse_lora()
18
  def resize(value,img):
19
  img = Image.open(img)
20
  img = img.resize((value,value))