Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ use_va = True
|
|
42 |
models_dict = {
|
43 |
# "Juggernaut": "RunDiffusion/Juggernaut-XL-v8",
|
44 |
"RealVision": "SG161222/RealVisXL_V4.0" ,
|
45 |
-
|
46 |
-
"Unstable": "stablediffusionapi/sdxl-unstable-diffusers-y"
|
47 |
}
|
48 |
photomaker_path = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v1.bin", repo_type="model")
|
49 |
MAX_SEED = np.iinfo(np.int32).max
|
@@ -436,7 +436,7 @@ use_safetensors= False
|
|
436 |
# pipe1.scheduler.set_timesteps(50)
|
437 |
###
|
438 |
pipe2 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
|
439 |
-
models_dict["
|
440 |
pipe2 = pipe2.to("cpu")
|
441 |
pipe2.load_photomaker_adapter(
|
442 |
os.path.dirname(photomaker_path),
|
@@ -449,7 +449,7 @@ pipe2.enable_freeu(s1=0.6, s2=0.4, b1=1.1, b2=1.2)
|
|
449 |
pipe2.fuse_lora()
|
450 |
|
451 |
pipe4 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
|
452 |
-
models_dict["
|
453 |
pipe4 = pipe4.to("cpu")
|
454 |
pipe4.load_photomaker_adapter(
|
455 |
os.path.dirname(photomaker_path),
|
|
|
42 |
models_dict = {
|
43 |
# "Juggernaut": "RunDiffusion/Juggernaut-XL-v8",
|
44 |
"RealVision": "SG161222/RealVisXL_V4.0" ,
|
45 |
+
"SDXL":"stabilityai/stable-diffusion-xl-base-1.0" ,
|
46 |
+
# "Unstable": "stablediffusionapi/sdxl-unstable-diffusers-y"
|
47 |
}
|
48 |
photomaker_path = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v1.bin", repo_type="model")
|
49 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
436 |
# pipe1.scheduler.set_timesteps(50)
|
437 |
###
|
438 |
pipe2 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
|
439 |
+
models_dict["RealVision"], torch_dtype=torch.float16, use_safetensors=use_safetensors)
|
440 |
pipe2 = pipe2.to("cpu")
|
441 |
pipe2.load_photomaker_adapter(
|
442 |
os.path.dirname(photomaker_path),
|
|
|
449 |
pipe2.fuse_lora()
|
450 |
|
451 |
pipe4 = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
|
452 |
+
models_dict["SDXL"], torch_dtype=torch.float16, use_safetensors=True)
|
453 |
pipe4 = pipe4.to("cpu")
|
454 |
pipe4.load_photomaker_adapter(
|
455 |
os.path.dirname(photomaker_path),
|