{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/fantasyid-face-knowledge-enhanced-id","title":"FantasyID: Face Knowledge Enhanced ID-Preserving Video Generation","arxiv_id":"2502.13995","date":"2025-02-19","proceeding":null,"authors":["Yunpeng Zhang","Qiang Wang","Fan Jiang","Yaqi Fan","Mu Xu","Yonggang Qi"],"abstract":"Tuning-free approaches adapting large-scale pre-trained video diffusion models for identity-preserving text-to-video generation (IPT2V) have gained popularity recently due to their efficacy and scalability. However, significant challenges remain to achieve satisfied facial dynamics while keeping the identity unchanged. In this work, we present a novel tuning-free IPT2V framework by enhancing face knowledge of the pre-trained video model built on diffusion transformers (DiT), dubbed FantasyID. Essentially, 3D facial geometry prior is incorporated to ensure plausible facial structures during video synthesis. To prevent the model from learning copy-paste shortcuts that simply replicate reference face across frames, a multi-view face augmentation strategy is devised to capture diverse 2D facial appearance features, hence increasing the dynamics over the facial expressions and head poses. Additionally, after blending the 2D and 3D features as guidance, instead of naively employing cross-attention to inject guidance cues into DiT layers, a learnable layer-aware adaptive mechanism is employed to selectively inject the fused features into each individual DiT layers, facilitating balanced modeling of identity preservation and motion dynamics. Experimental results validate our model's superiority over the current tuning-free IPT2V methods.","url_abs":"https://arxiv.org/abs/2502.13995v1","url_pdf":"https://arxiv.org/pdf/2502.13995v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"fantasyid-face-knowledge-enhanced-id","repo_url":"https://github.com/Fantasy-AMAP/fantasy-id","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2502.13995","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.13995"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Fantasy-AMAP/fantasy-id","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":3,"ran_fixture":1,"ran":1,"unverified":10},"by_repo_kind":{"official":{"samples":15,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"5105747c2711b1cb","entry":"FeedForward","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/face_abstractor.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/face_abstractor.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5105747c2711b1cb"}},{"code_sha256_prefix":"734fd43f6aaef115","entry":"get_resize_crop_region_for_grid","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/pipeline_cogvideox.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/pipeline_cogvideox.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"734fd43f6aaef115"}},{"code_sha256_prefix":"22b1f260da28f6a5","entry":"retrieve_timesteps","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/pipeline_cogvideox.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/pipeline_cogvideox.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"22b1f260da28f6a5"}},{"code_sha256_prefix":"43ebe3b786b2d59b","entry":"to_np","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"decalib/models/FLAME.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/decalib/models/FLAME.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"43ebe3b786b2d59b"}},{"code_sha256_prefix":"94904a5bd2e1074f","entry":"to_tensor","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"decalib/models/FLAME.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/decalib/models/FLAME.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"94904a5bd2e1074f"}},{"code_sha256_prefix":"c25969b64473a346","entry":"build_eos_tokens","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/projectors.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/projectors.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c25969b64473a346"}},{"code_sha256_prefix":"5a9384b1ad01e795","entry":"build_pos_embeds","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/projectors.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/projectors.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5a9384b1ad01e795"}},{"code_sha256_prefix":"e3017f9dc26de2b5","entry":"check_local_file","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/projectors.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/projectors.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e3017f9dc26de2b5"}},{"code_sha256_prefix":"083a6bdfd189d961","entry":"compute_prompt_embeddings","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"083a6bdfd189d961"}},{"code_sha256_prefix":"3a9e3b5be46cd837","entry":"draw_kps","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/pipeline_id.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/pipeline_id.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3a9e3b5be46cd837"}},{"code_sha256_prefix":"70450d0b824cf3e6","entry":"encode_prompt","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"70450d0b824cf3e6"}},{"code_sha256_prefix":"c17ad34b7b0cba0e","entry":"process_image","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/pipeline_id.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/pipeline_id.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c17ad34b7b0cba0e"}},{"code_sha256_prefix":"4cb2e2a2ca0bec9f","entry":"reshape_tensor","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/face_abstractor.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/face_abstractor.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4cb2e2a2ca0bec9f"}},{"code_sha256_prefix":"6d7dce3292d1b3e1","entry":"tensor_to_pil","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6d7dce3292d1b3e1"}},{"code_sha256_prefix":"56a78bc81ef23be7","entry":"to_sparse","repo":"Fantasy-AMAP/fantasy-id","repo_kind":"official","path":"models/vertex_encode.py","file_url":"https://github.com/Fantasy-AMAP/fantasy-id/blob/HEAD/models/vertex_encode.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"56a78bc81ef23be7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}