PPIO 上线 GLM-Image 部署模板,10分钟拥有私有化模型

PPIO 上线 GLM-Image 部署模板,10分钟拥有私有化模型

今天,PPIO 上线图像生成领域的重磅模型——智谱 GLM-Image。

GLM-Image 利用基于GLM-4的自回归生成器进行精准的语义规划和布局,再通过扩散解码器完成高保真成像,从而具备了卓越的长文本理解力。

其核心突破在于SOTA级的文字渲染能力,在 CVTG-2K 基准中准确率超91%,彻底解决了AI生成海报文字乱码的行业痛点。结合GRPO美学强化学习策略,GLM-Image 在处理复杂空间关系、知识密集型绘图及图文排版任务上,展现出了远超传统纯扩散模型的表现力,是目前开源界“懂逻辑、会写字”的新一代视觉创作工具。

现在,你可以通过 PPIO 算力市场的 GLM-Image 模板,将模型一键部署在 GPU 云服务器上,简单几步就能拥有私有化的 GLM-Image 模型。

在线体验链接:

https://ppio.com/gpu-instance/console/explore?selectTemplate=select

# 01  GPU 实例+模板,一键部署 GLM-Image

step 1: 

子模版市场选择对应模板,并使用此模板。 

 step 2: 

按照所需配置点击部署。  

·step 3: 

检查磁盘大小等信息,确认无误后点击下一步。  

step 4

 稍等一会,实例创建需要一些时间。

step 5: 

在实例管理里可以查看到所创建的实例。

step 6: 

查看实例日志,确保服务正常启动。

# 02 如何使用 示例 text2image.py

from diffusers.pipelines.glm_image import GlmImagePipeline

pipe = GlmImagePipeline.from_pretrained("zai-org/GLM-Image", torch_dtype=torch.bfloat16, device_map="cuda")             
prompt = "A beautifully designed modern food magazine style dessert recipe illustration, themed around a raspberry mousse cake. The overall layout is clean and bright, divided into four main areas: the top left features a bold black title 'Raspberry Mousse Cake Recipe Guide', with a soft-lit close-up photo of the finished cake on the right, showcasing a light pink cake adorned with fresh raspberries and mint leaves; the bottom left contains an ingredient list section, titled 'Ingredients' in a simple font, listing 'Flour 150g', 'Eggs 3', 'Sugar 120g', 'Raspberry puree 200g', 'Gelatin sheets 10g', 'Whipping cream 300ml', and 'Fresh raspberries', each accompanied by minimalist line icons (like a flour bag, eggs, sugar jar, etc.); the bottom right displays four equally sized step boxes, each containing high-definition macro photos and corresponding instructions, arranged from top to bottom as follows: Step 1 shows a whisk whipping white foam (with the instruction 'Whip egg whites to stiff peaks'), Step 2 shows a red-and-white mixture being folded with a spatula (with the instruction 'Gently fold in the puree and batter'), Step 3 shows pink liquid being poured into a round mold (with the instruction 'Pour into mold and chill for 4 hours'), Step 4 shows the finished cake decorated with raspberries and mint leaves (with the instruction 'Decorate with raspberries and mint'); a light brown information bar runs along the bottom edge, with icons on the left representing 'Preparation time: 30 minutes', 'Cooking time: 20 minutes', and 'Servings: 8'. The overall color scheme is dominated by creamy white and light pink, with a subtle paper texture in the background, featuring compact and orderly text and image layout with clear information hierarchy."                                 
image = pipe(         
    prompt=prompt,                                                                            
    height=32 * 32,                                                                           
    width=36 * 32,                                                                           
    num_inference_steps=30,                                                                  
    guidance_scale=1.5,                                                                     
    generator=torch.Generator(device="cuda").manual_seed(42), 
).images[0]
image.save("output_t2i.png")

你可以通过修改 text2image.py 中的 prompt 来运行或者直接使用现有的案例运行。

python3 text2image.py                                                                                                                                                                    
Couldn't connect to the Hub: Cannot reach https://huggingface.co/api/models/zai-org/GLM-Image: offline mode is enabled. To disable it, please unset the `HF_HUB_OFFLINE` environment variable..                   
Will try to load from local cache.                                                                                                                                                                                
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00,  1.47it/s]
Loading weights: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 111/111 [00:00<00:00, 1391.52it/s, Materializing param=shared.weight]
Loading pipeline components...:  71%|██████████████████████████████████████████████████████████████████████████████████████████████████████▏                                        | 5/7 [00:02<00:00,  2.91it/s]Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.52, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with`use_fast=False`.                                                                                                 
Loading weights: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 1011/1011 [00:02<00:00, 359.59it/s, Materializing param=model.vqmodel.quantize.embedding.weight]
Loading pipeline components...: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:07<00:00,  1.02s/it]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [00:11<00:00,  2.69it/s]

output_t2i.png

示例 image2image.py

import torch                                                                                                            
from diffusers.pipelines.glm_image import GlmImagePipeline                                                              
from PIL import Image                                                                                                                                                                                                                           
pipe = GlmImagePipeline.from_pretrained("zai-org/GLM-Image", torch_dtype=torch.bfloat16, device_map="cuda")             
image_path = "cond.jpg"                                                                                                 
prompt = "Replace the background of the snow forest with an underground station featuring an automatic escalator."      
image = Image.open(image_path).convert("RGB")                                                                           
image = pipe(                                                                                                              
    prompt=prompt,                                                                                                          
    image=[image],  # can input multiple images for multi-image-to-image generation such as [image, image1]                 
    height=33 * 32,                                                                                                         
    width=32 * 32,                                                                                                          
    num_inference_steps=30,                                                                                                 
    guidance_scale=1.5,                                                                                                     
    generator=torch.Generator(device="cuda").manual_seed(42),                                                           ).images[0]                                                                                                                                                                                                                                     
image.save("output_i2i.png")

python3 image2image.py

你可以通过修改 image2image.py 中的 prompt 和 image 来运行 或者直接使用现有的案例运行

python3 image2image.py
Couldn't connect to the Hub: Cannot reach https://huggingface.co/api/models/zai-org/GLM-Image: offline mode is enabled. To disable it, please unset the `HF_HUB_OFFLINE` environment variable..                   
Will try to load from local cache.                                                                                                                                                                                
Loading pipeline components...:   0%|                                                                                                                                                       | 0/7 [00:00<?, ?it/s]Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.52, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with`use_fast=False`.                                                                                                 
Loading weights: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 1011/1011 [00:02<00:00, 360.88it/s, Materializing param=model.vqmodel.quantize.embedding.weight]
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00,  1.46it/s]
Loading weights: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 111/111 [00:00<00:00, 1426.62it/s, Materializing param=shared.weight]
Loading pipeline components...: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:07<00:00,  1.03s/it]
100%|███████████████████████████████████████████████████████████████████████████████████| 30/30 [00:10<00:00,  2.97it/s]

# 03 结语

PPIO 的算力市场模板致力于帮助企业及个人开发者降低大模型私有化部署的门槛,无需繁琐的环境配置,即可实现高效、安全的模型落地。

目前,PPIO算力市场已上线几十个私有化部署模板,除了 GLM-Image,你也可以将 AutoGLM-Phone-9B、Nemotron Speech ASR、PaddleOCR-VL 等模型快速进行私有化部署。

Read more

PPIO上线“企业Token Plan”:主流旗舰模型最低6折接入,支持200席位

PPIO上线“企业Token Plan”:主流旗舰模型最低6折接入,支持200席位

AI 应用落地进入规模化阶段后,企业面临的挑战已经从“能不能用”变成了“怎么用得起、用得稳、管得住”。 过去一年,模型 API 的调用成本普遍下降了一个数量级,但这并没有让企业的 AI 预算问题消失。主流可用的模型从三五个变成了十几个,每家厂商定价体系不同,缓存机制不同,并发限制也不同。多模型混用的企业团队,往往需要维护多个账户、多套账单,遇到某个模型价格调整或服务波动时处理起来相当被动。 而现在,PPIO 发布的企业 Token Plan,正是要解决这些问题。 一键接入 17 款主流大模型,支持 200 席位 PPIO 企业 Token Plan 是一套标准化的预付费折扣产品,核心机制是“融合 Token”:以 DeepSeek V4 Flash 输入 Token 为基准单位(

By PPIO
PPIO正式发布“Fusion融合模型”:用十分之一的价格超越顶级模型的智商

PPIO正式发布“Fusion融合模型”:用十分之一的价格超越顶级模型的智商

省钱又智能的 Fusion 融合模型来了! 跟仅做简单请求转发的传统 API 网关不同,PPIO 智能模型网关正式上线的新功能——Fusion 融合模型会将每次调用变成一场“专家会诊”——网关会将复杂任务同时分发给多个各有所长的“专家模型”并行作答,再通过思考编排与交叉验证,由主模型融合生成最终答案。 Fusion 模型以智能优先、兼顾性价比:通过工程化的融合手段,把回答质量稳定在头部旗舰模型梯队,同时把成本控制在中低梯队。在 DRACO 深度研究基准测试中,PPIO 用三个开源模型融合后的评分超越了 Claude Fable 5,而成本仅为后者的十分之一。 Fusion 融合模型证明,智能的提升不再只发生在参数层,它也可以发生在调用层。 为什么 Agent 时代不能只依赖一个模型? 2026 年,大模型市场进入密集迭代期。Claude、GPT、Kimi、GLM 等主流模型几乎每季度都有新版本发布,排行榜的头部位置频繁更替。对应用开发者而言,可选的模型越来越多,但每个模型都有各自的短板。

By PPIO
爆满收官!PPIO构建AI落地“最强朋友圈”

爆满收官!PPIO构建AI落地“最强朋友圈”

WAIC开展前夜,7月16日,我们在上海北外滩组织了一场AI Builders Night。 从模型、Agent 到算力、数据与应用,AI 行业的变化越来越快。 但当热度持续攀升,一个更具体的问题也被反复提起:技术能力不断向前,究竟有多少产品真正进入了业务,进入了用户的工作流,进入了真实世界? 这一次,我们把讨论留给正在一线推进的人。 # 01 重磅圆桌 行业大佬拆解AI落地真相 我们邀请了四位深耕AI产业、落地经验丰富的重磅嘉宾:PPIO 合伙人陆昆仑、明略科技创始人吴明辉、Joulebeat 创始人向涛,以及蚂蚁集团副总裁 & 蚂蚁百灵大模型负责人周俊。 讨论全程聚焦AI创业、产品落地的真实痛点与真实困惑:团队踩过的实战深坑、被用户否决的功能、倒逼产品改版的客户反馈、曾经判断失误的行业决策。 比起复盘“做对了什么”,这些真实的试错成本、尚未解决的行业难题,才是更有参考价值的行业经验。 几位嘉宾以不同赛道、不同视角的观点交锋,展开了激烈的探讨,最终沉淀出统一共识:AI的价值从来不在于单次演示的惊艳效果,而在于能否打通企业数据与系统、适配复杂业务流程,

By luigi