{"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/stylet2i-toward-compositional-and-high","title":"StyleT2I: Toward Compositional and High-Fidelity Text-to-Image Synthesis","arxiv_id":"2203.15799","date":"2022-03-29","proceeding":"CVPR 2022 1","authors":["Zhiheng Li","Martin Renqiang Min","Kai Li","Chenliang Xu"],"abstract":"Although progress has been made for text-to-image synthesis, previous methods fall short of generalizing to unseen or underrepresented attribute compositions in the input text. Lacking compositionality could have severe implications for robustness and fairness, e.g., inability to synthesize the face images of underrepresented demographic groups. In this paper, we introduce a new framework, StyleT2I, to improve the compositionality of text-to-image synthesis. Specifically, we propose a CLIP-guided Contrastive Loss to better distinguish different compositions among different sentences. To further improve the compositionality, we design a novel Semantic Matching Loss and a Spatial Constraint to identify attributes' latent directions for intended spatial region manipulations, leading to better disentangled latent representations of attributes. Based on the identified latent directions of attributes, we propose Compositional Attribute Adjustment to adjust the latent code, resulting in better compositionality of image synthesis. In addition, we leverage the $\\ell_2$-norm regularization of identified latent directions (norm penalty) to strike a nice balance between image-text alignment and image fidelity. In the experiments, we devise a new dataset split and an evaluation metric to evaluate the compositionality of text-to-image synthesis models. The results show that StyleT2I outperforms previous approaches in terms of the consistency between the input text and synthesized images and achieves higher fidelity.","url_abs":"https://arxiv.org/abs/2203.15799v1","url_pdf":"https://arxiv.org/pdf/2203.15799v1.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":"abstracts"},"code_links":[{"paper_slug":"stylet2i-toward-compositional-and-high","repo_url":"https://github.com/zhihengli-UR/StyleT2I","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"fairness","task_name":"Fairness"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"high","task_name":"Vocal Bursts Intensity Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.15799","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.15799"}},"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":"deterministic:regex_extraction","url":"https://github.com/zhihengli-UR/StyleT2I","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"summary":{"ran_draft_wrong":2,"ran_violates":1,"unverified":2},"by_repo_kind":{"official":{"samples":5,"ran":3,"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":"3651db4e5ae8d189","entry":"d_logistic_loss","repo":"zhihengli-UR/StyleT2I","repo_kind":"official","path":"pretrain_stylegan2.py","file_url":"https://github.com/zhihengli-UR/StyleT2I/blob/HEAD/pretrain_stylegan2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3651db4e5ae8d189"}},{"code_sha256_prefix":"dbb756dcd778f52f","entry":"data_sampler","repo":"zhihengli-UR/StyleT2I","repo_kind":"official","path":"pretrain_stylegan2.py","file_url":"https://github.com/zhihengli-UR/StyleT2I/blob/HEAD/pretrain_stylegan2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"dbb756dcd778f52f"}},{"code_sha256_prefix":"6f65e378a4313f87","entry":"make_kernel","repo":"zhihengli-UR/StyleT2I","repo_kind":"official","path":"model/stylegan2/model.py","file_url":"https://github.com/zhihengli-UR/StyleT2I/blob/HEAD/model/stylegan2/model.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6f65e378a4313f87"}},{"code_sha256_prefix":"00b4f73801b989bc","entry":"differentiable_clip_preprocess_from_stylegan","repo":"zhihengli-UR/StyleT2I","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhihengli-UR/StyleT2I/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"00b4f73801b989bc"}},{"code_sha256_prefix":"ce190032cd9b11db","entry":"pad_text_seq_collate","repo":"zhihengli-UR/StyleT2I","repo_kind":"official","path":"dataset/data_utils.py","file_url":"https://github.com/zhihengli-UR/StyleT2I/blob/HEAD/dataset/data_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ce190032cd9b11db"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}