Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
Norod78Β 
posted an update Jan 21
Post
I've prepared a Google Colab notebook which allows you to play with interpolating between different people using IP-Adapter SDXL Face-ID Plus.

#Prepare a list t of num_of_results values between 0 and 1
t_space = torch.linspace(0, 1, num_of_results)
for t in tqdm(t_space):
    mix_factor = t.item()
    # interpolate between the two face images 
    image = (image1 * (1 - mix_factor) + image2 * mix_factor).astype(np.uint8)
    # interpolate between the two face embedding 
    faceid_embeds = torch.lerp(faceid_embeds1, faceid_embeds2, t)
   #generate interpolated result
    images = ip_model.generate(prompt=prompt, negative_prompt=negative_prompt, face_image=image, faceid_embeds=faceid_embeds, shortcut=v2, num_samples=2, scale=scale, s_scale=s_scale, guidance_scale=guidance_scale, width=width, height=height, num_inference_steps=steps, seed=seed)


Link to notebook:
Norod78/face_id_v2_test_code

Link to Face-ID Repo:
h94/IP-Adapter-FaceID

Link to all sorts of generated examples (Use the file tab):
Norod78/face_id_v2_test_code

Great work! What do you think are potential use cases to implement this type of technology ?

Β·

Currently I can only think of silly entertainment in the sense of "how will you look, have you been mixed with this or that celebrity" :)

So cool! This makes me think maybe we can use distances (say cosine similarity) on the embeddings to find celebrity look a likes πŸ‘―β€β™‚οΈ
you think it could work?

Β·

Well, if "face feature" similarity is enough (as in ignore the hair cut and such), then it will probably work :) Could be fun in any case and only requires the insightface part for the detection.

very cool!

Β·

Thank you πŸ™

Hello, Norod. My name is Max. I admire your skills in artificial intelligence. I need your help. I'll be so grateful if you can help. Of course, for $ ))

Β·

Thank you, but I'm not intrested