Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -71,7 +71,6 @@ clip_image_processor = CLIPImageProcessor(size = 336, crop_size = 336)
|
|
71 |
hf_hub_download(repo_id="Kwai-Kolors/Kolors-IP-Adapter-FaceID-Plus", filename="ipa-faceid-plus.bin",cache_dir='./')
|
72 |
|
73 |
snapshotname = os.listdir('./models--Kwai-Kolors--Kolors-IP-Adapter-FaceID-Plus/snapshots')[0]
|
74 |
-
print(os.listdir(f'models--Kwai-Kolors--Kolors-IP-Adapter-FaceID-Plus/snapshots/{snapshotname}'))
|
75 |
|
76 |
pipe = StableDiffusionXLControlNetImg2ImgPipeline(
|
77 |
vae=vae,
|
@@ -94,7 +93,7 @@ pipe.set_face_fidelity_scale(ip_scale)
|
|
94 |
pipe = pipe.to("cuda")
|
95 |
pipe.enable_model_cpu_offload()
|
96 |
|
97 |
-
@
|
98 |
def infer(face_img,pose_img, garm_img, prompt,negative_prompt, n_samples, n_steps, seed):
|
99 |
face_img = Image.open(face_img)
|
100 |
pose_img = Image.open(pose_img)
|
|
|
71 |
hf_hub_download(repo_id="Kwai-Kolors/Kolors-IP-Adapter-FaceID-Plus", filename="ipa-faceid-plus.bin",cache_dir='./')
|
72 |
|
73 |
snapshotname = os.listdir('./models--Kwai-Kolors--Kolors-IP-Adapter-FaceID-Plus/snapshots')[0]
|
|
|
74 |
|
75 |
pipe = StableDiffusionXLControlNetImg2ImgPipeline(
|
76 |
vae=vae,
|
|
|
93 |
pipe = pipe.to("cuda")
|
94 |
pipe.enable_model_cpu_offload()
|
95 |
|
96 |
+
@spaces.GPU
|
97 |
def infer(face_img,pose_img, garm_img, prompt,negative_prompt, n_samples, n_steps, seed):
|
98 |
face_img = Image.open(face_img)
|
99 |
pose_img = Image.open(pose_img)
|