cocktailpeanut commited on
Commit
ccf3e2b
1 Parent(s): e7f218c
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -444,27 +444,27 @@ use_safetensors= False
444
  ###
445
  pipe2 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
446
  models_dict["Unstable"], torch_dtype=torch.float16, use_safetensors=use_safetensors)
447
- pipe2 = pipe2.to(device)
448
  pipe2.load_photomaker_adapter(
449
  os.path.dirname(photomaker_path),
450
  subfolder="",
451
  weight_name=os.path.basename(photomaker_path),
452
  trigger_word="img" # define the trigger word
453
  )
454
- pipe2 = pipe2.to(device)
455
  pipe2.enable_freeu(s1=0.6, s2=0.4, b1=1.1, b2=1.2)
456
  pipe2.fuse_lora()
457
 
458
  pipe4 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
459
  models_dict["RealVision"], torch_dtype=torch.float16, use_safetensors=True)
460
- pipe4 = pipe4.to(device)
461
  pipe4.load_photomaker_adapter(
462
  os.path.dirname(photomaker_path),
463
  subfolder="",
464
  weight_name=os.path.basename(photomaker_path),
465
  trigger_word="img" # define the trigger word
466
  )
467
- pipe4 = pipe4.to(device)
468
  pipe4.enable_freeu(s1=0.6, s2=0.4, b1=1.1, b2=1.2)
469
  pipe4.fuse_lora()
470
 
 
444
  ###
445
  pipe2 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
446
  models_dict["Unstable"], torch_dtype=torch.float16, use_safetensors=use_safetensors)
447
+ pipe2 = pipe2.to('cpu')
448
  pipe2.load_photomaker_adapter(
449
  os.path.dirname(photomaker_path),
450
  subfolder="",
451
  weight_name=os.path.basename(photomaker_path),
452
  trigger_word="img" # define the trigger word
453
  )
454
+ pipe2 = pipe2.to('cpu')
455
  pipe2.enable_freeu(s1=0.6, s2=0.4, b1=1.1, b2=1.2)
456
  pipe2.fuse_lora()
457
 
458
  pipe4 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
459
  models_dict["RealVision"], torch_dtype=torch.float16, use_safetensors=True)
460
+ pipe4 = pipe4.to('cpu')
461
  pipe4.load_photomaker_adapter(
462
  os.path.dirname(photomaker_path),
463
  subfolder="",
464
  weight_name=os.path.basename(photomaker_path),
465
  trigger_word="img" # define the trigger word
466
  )
467
+ pipe4 = pipe4.to('cpu')
468
  pipe4.enable_freeu(s1=0.6, s2=0.4, b1=1.1, b2=1.2)
469
  pipe4.fuse_lora()
470