[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-85292-en":3,"doc-seo-85292-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},85292,687197207919,"Theodora","https://ap-avatar.wpscdn.com/avatar/a000253d6f5f7c60be?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779446848396160552",8,"Research & Report","Xema Efficient Diffusion Serving through Fine-Grained Memory Management and Auto Configuration","Diffusion models are increasingly used as production visual-generation services, yet high-resolution image and long video serving is often constrained by GPU memory. Xema is a memory-efficient diffusion serving system that uses predictable tensor lifetimes to produce offline memory traces per request template, targeting only short high-pressure intervals and only the minimum mitigation needed for a specified GPU budget. It builds a static memory layout to reduce fragmentation and enables an offline planner that co-optimizes parallelism, concurrency, and memory control under GPU memory and SLO constraints, then uses the plan at runtime. Evaluations on Flux.2, CogVideoX-5B, and LTX-2 show up to 3.7× improved SLO attainment and planning cost reduced from 6.3 hours to 197 seconds versus grid search.","Xema: Efficient Diffusion Serving through Fine-Grained Memory Management and Auto-Configuration  \nXueze Kang∗ The Hong Kong University of Science and Technology (Guangzhou)  \nGuangzhou, China [xkang507@connect.hkust-gz.edu.cn](xkang507@connect.hkust-gz.edu.cn)  \nGuangyu Xiang∗ The Hong Kong University of Science and Technology (Guangzhou)  \nGuangzhou, China [gxiang190@connect.hkust-gz.edu.cn](gxiang190@connect.hkust-gz.edu.cn)  \nSuyi Li  \nHong Kong University of Science and Technology Hong Kong, China[slida@cse.ust.hk](slida@cse.ust.hk)  \nYuxin Wang No institutional affiliation [yxwang.ele@gmail.com](yxwang.ele@gmail.com)  \nShaohuai Shi  \nHarbin Institute of Technology, Shenzhen  \nShenzhen, China [shaohuais@hit.edu.cn](shaohuais@hit.edu.cn)  \nLin Zhang† Hong Kong University of Science and Technology Hong Kong, China [lzhangbv@connect.ust.hk](lzhangbv@connect.ust.hk)  \narXiv :2607 . 11136v1 [ cs .DC] 13 Jul 2026  \nXiaowen Chu† The Hong Kong University of Science and Technology (Guangzhou) Guangzhou, China [xwchu@hkust-gz.edu.cn](xwchu@hkust-gz.edu.cn)  \nAbstract  \nDiffusion models are increasingly deployed as production visual-generation services, where serving high-resolution image and long video generation is often limited by GPU memory. Popular memory-saving techniques such as weight offloading, sharding, and VAE slicing are often not practical because they tend to introduce significant performance overhead. In this paper, we present Xema, a memory-efficient diffusion serving system that exploits predictable tensor lifetimes for trace-guided memory optimization. For each request template, Xema derives an offline memory trace to identify short memory-pressure intervals and applies memory mitigation only within these intervals and only by the amount needed to fit the target GPU budget. Xema further constructs a static memory layout for tensors with predictable lifetimes, reducing fragmentation-induced reserved memory and making offline memory reasoning reliable at runtime. Built on this memory optimization layer, Xema introduces an offline planner that jointly selects parallelism, concurrency, and memory control under GPU memory and SLO constraints. The selected plan is stored in a plan table and directly used by the online serving runtime. We implement Xema on production diffusion pipelines and evaluate it with Flux.2, CogVideoX-5B, and LTX-2 . Compared with existing serving configurations, Xema improves SLO attainment by up to 3.7×, and reduces planning cost from 6.3 hours to 197 seconds compared with grid search.  \n∗ Equal contribution.†Corresponding author.  \n Xema  vLLM-Omni  \n480p × 49f  \nSP1 BS4 + offload 3 blocks  \nSP1 BS2  \nSP1 BS1  \n4.97  \n4.84  \n4.45  \n720p × 81f  \nSP1 BS1 + offload 5 blocks  \nSP1 BS1 + layerwise offload  \nSP2 BS1  \n1.29  \n1.12  \n1.05  \n1080p × 81f  \nSP1 BS1 + offload 18 blocks + fusion  \nSP2 BS1 + layerwise offload  \nSP4 BS1 + layerwise offload  \n0.36  \n0.19  \n0.46  \nreqs/min  \nFigure 1. Optimal execution configurations vary across LTX- 2 request templates. For each template, the first bar is selected by Xema, and the next two bars are the best and second-best configurations searched by vLLM-Omni. By expanding the search space with fine-grained memory controls, Xema finds higher-goodput configurations than vLLM-Omni.  \n1 Introduction  \nDiffusion models are now widely used in visual generation, including image generation [4, 28, 30, 35–37], image editing [3, 27, 39, 52], video generation [8, 9, 41, 50], 3D content creation [21, 31], and interactive design [5] . These applications are moving from offline demonstrations to production  \nConference’17, July 2017, Washington, DC, USA Kang et al.  \nservices, where the serving system must handle many user requests under latency and resource constraints. At the sametime, production workloads are shifting toward more demanding request templates, such as high-resolution images and long videos. In this paper, a request template refers toa supported combination","cbCaiubkxVQ1i7dc","https://ap.wps.com/l/cbCaiubkxVQ1i7dc","pdf",1948335,3,1,15,"English","en",105,"# Abstract\n# Introduction\n## Diffusion serving in production\n## GPU memory as a bottleneck\n## Limitations of existing memory controls","[{\"question\":\"What problem does Xema address in diffusion model serving?\",\"answer\":\"Xema addresses GPU memory limitations that prevent high-resolution image and long video diffusion requests from fitting within production GPU budgets while still meeting latency/SLO requirements.\"},{\"question\":\"How does Xema decide when and how to apply memory mitigation?\",\"answer\":\"Xema derives an offline memory trace for each request template to find short intervals of high memory pressure, then applies only the necessary memory mitigation within those intervals to meet the target GPU budget.\"},{\"question\":\"What makes Xema’s planning approach different from grid search?\",\"answer\":\"Xema introduces an offline planner that jointly selects parallelism, concurrency, and memory control under GPU memory and SLO constraints, stores the resulting plan in a plan table, and uses it directly at runtime—reducing planning time substantially compared to grid search.\"}]",1784202291,38,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"xema-efficient-diffusion-serving-through-fine-grained-memory-management-and-auto-configuration","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/research-report/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/xema-efficient-diffusion-serving-through-fine-grained-memory-management-and-auto-configuration/85292/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-24","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does Xema address in diffusion model serving?","Question",{"text":75,"@type":76},"Xema addresses GPU memory limitations that prevent high-resolution image and long video diffusion requests from fitting within production GPU budgets while still meeting latency/SLO requirements.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does Xema decide when and how to apply memory mitigation?",{"text":80,"@type":76},"Xema derives an offline memory trace for each request template to find short intervals of high memory pressure, then applies only the necessary memory mitigation within those intervals to meet the target GPU budget.",{"name":82,"@type":73,"acceptedAnswer":83},"What makes Xema’s planning approach different from grid search?",{"text":84,"@type":76},"Xema introduces an offline planner that jointly selects parallelism, concurrency, and memory control under GPU memory and SLO constraints, stores the resulting plan in a plan table, and uses it directly at runtime—reducing planning time substantially compared to grid search.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]