{"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/semantic-guided-diffusion-model-for-single","title":"Semantic-Guided Diffusion Model for Single-Step Image Super-Resolution","arxiv_id":"2505.07071","date":"2025-05-11","proceeding":null,"authors":["Zihang Liu","Zhenyu Zhang","Hao Tang"],"abstract":"Diffusion-based image super-resolution (SR) methods have demonstrated remarkable performance. Recent advancements have introduced deterministic sampling processes that reduce inference from 15 iterative steps to a single step, thereby significantly improving the inference speed of existing diffusion models. However, their efficiency remains limited when handling complex semantic regions due to the single-step inference. To address this limitation, we propose SAMSR, a semantic-guided diffusion framework that incorporates semantic segmentation masks into the sampling process. Specifically, we introduce the SAM-Noise Module, which refines Gaussian noise using segmentation masks to preserve spatial and semantic features. Furthermore, we develop a pixel-wise sampling strategy that dynamically adjusts the residual transfer rate and noise strength based on pixel-level semantic weights, prioritizing semantically rich regions during the diffusion process. To enhance model training, we also propose a semantic consistency loss, which aligns pixel-wise semantic weights between predictions and ground truth. Extensive experiments on both real-world and synthetic datasets demonstrate that SAMSR significantly improves perceptual quality and detail recovery, particularly in semantically complex images. Our code is released at https://github.com/Liu-Zihang/SAMSR.","url_abs":"https://arxiv.org/abs/2505.07071v1","url_pdf":"https://arxiv.org/pdf/2505.07071v1.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":"semantic-guided-diffusion-model-for-single","repo_url":"https://github.com/liu-zihang/samsr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-super-resolution","task_name":"Image Super-Resolution"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"super-resolution","task_name":"Super-Resolution"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2505.07071","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.07071"}},"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/Liu-Zihang/SAMSR","reach":null}],"summary":{"ran":3,"unverified":4},"by_repo_kind":{"official":{"samples":7,"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":7,"samples":[{"code_sha256_prefix":"5a923f8114a667b6","entry":"Downsample","repo":"Liu-Zihang/SAMSR","repo_kind":"official","path":"models/unet.py","file_url":"https://github.com/Liu-Zihang/SAMSR/blob/HEAD/models/unet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5a923f8114a667b6"}},{"code_sha256_prefix":"7efd91ea9f6001f4","entry":"ResBlock","repo":"Liu-Zihang/SAMSR","repo_kind":"official","path":"models/unet.py","file_url":"https://github.com/Liu-Zihang/SAMSR/blob/HEAD/models/unet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7efd91ea9f6001f4"}},{"code_sha256_prefix":"b7f9265f946567f7","entry":"Upsample","repo":"Liu-Zihang/SAMSR","repo_kind":"official","path":"models/unet.py","file_url":"https://github.com/Liu-Zihang/SAMSR/blob/HEAD/models/unet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b7f9265f946567f7"}},{"code_sha256_prefix":"2c162b40224c7fc6","entry":"AttentionBlock","repo":"Liu-Zihang/SAMSR","repo_kind":"official","path":"models/unet.py","file_url":"https://github.com/Liu-Zihang/SAMSR/blob/HEAD/models/unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2c162b40224c7fc6"}},{"code_sha256_prefix":"747e24ab77a1397e","entry":"QKVAttention","repo":"Liu-Zihang/SAMSR","repo_kind":"official","path":"models/unet.py","file_url":"https://github.com/Liu-Zihang/SAMSR/blob/HEAD/models/unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"747e24ab77a1397e"}},{"code_sha256_prefix":"1e895761b1061fb4","entry":"QKVAttentionLegacy","repo":"Liu-Zihang/SAMSR","repo_kind":"official","path":"models/unet.py","file_url":"https://github.com/Liu-Zihang/SAMSR/blob/HEAD/models/unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e895761b1061fb4"}},{"code_sha256_prefix":"866ec9bc29345371","entry":"UNetModel","repo":"Liu-Zihang/SAMSR","repo_kind":"official","path":"models/unet.py","file_url":"https://github.com/Liu-Zihang/SAMSR/blob/HEAD/models/unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"866ec9bc29345371"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}