ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

Reve 2.1 模型数据更新指南:Civitai 镜像模型的 baseModel 与 description 手动 SQL 变更实践

Reve 2.1 模型数据更新指南:Civitai 镜像模型的 baseModel 与 description 手动 SQL 变更实践 Reve 2.1 模型数据更新指南Civitai 镜像模型的 baseModel 与 description 手动 SQL 变更实践【免费下载链接】civitaiA repository of models, textual inversions, and more项目地址: https://gitcode.com/GitHub_Trending/ci/civitai本篇技术指南围绕 Civitai 仓库中 docs/reve-2.1-model-update.md 记录的运维流程展开讲解如何为CivitaiOfficial账号下镜像的Reve 2.1模型Checkpoint 类型、Draft 状态执行两笔数据更新将ModelVersion.baseModel从占位值SD 1.5改为Reve并将模型页面的 HTML 描述替换为 Reve AI 官方文案。读完本文你将掌握这类非 Prisma 迁移的数据变更如何在 preview / staging / prod 各环境手动应用、如何用验证 SQL 确认写入结果以及baseModel字符串如何通过basemodel.constants.ts中的生态系统常量解析为真实生态。背景为什么需要手动执行 UPDATE 而非prisma migrate deploy该模型是一个镜像模型mirrored model即从外部基础模型实验室Reve AI镜像到 Civitai 平台、挂在官方账号CivitaiOfficial下的记录。与常规 schema 演进不同本次变更只是针对现有行的普通UPDATE不涉及表结构变化因此不运行prisma migrate deploy变更必须手动应用到每个目标环境preview / staging / prod代码改动本分支的常量文件与 SQL 数据变更必须同时部署——baseModel字符串只有在常量变更上线后才会解析成真实生态两者割裂会导致模型无法按预期路由。文档给出的目标行已在副本库 replica 上确认如下字段值ModelVersion id3133202版本名v2.1当前baseModelSD 1.5占位值→ReveModel id2781889名称Reve类型Checkpoint所有者CivitaiOfficial状态Draft前置条件baseModel 常量中的 Reve 生态系统Reve这个名字之所以能从一个字符串变成可路由的生态是因为它在基座模型常量中完成了注册。需要指出的是src/shared/constants/basemodel.constants.ts 本身只是一个 re-export shim文件头注释明确说明该模块已迁移到civitai/shared包以便 creator-studio spoke 也能解析基座模型真正的实现位于 packages/civitai-shared/src/basemodel.constants.ts。该文件采用生态系统ecosystem架构包含三层关联定义生态系统常量ECO.Reve 77并在ecosystems数组中注册为id: ECO.Reve, key: Reve, displayName: Reve, familyId: 24, sortOrder: 190Reve AI Family基座模型常量BM.Reve 96对应BaseModelRecord记录name: Reve、type: image、ecosystemId: ECO.Reve、licenseId: 38许可证记录licenses数组中id: 38的name为Reve AI Terms of Serviceurl为https://app.reve.com/terms——正是文档 Notes 中要求确认的条款链接。此外ecosystemSupport中还为 Reve 生态声明了能力边界{ ecosystemId: ECO.Reve, supportType: generation, modelTypes: checkpointOnly }注释标明 Reve 2.1, locked, FAL engine, no LoRA support。也就是说该生态在生成侧只接受 Checkpoint不开放 LoRA 训练且推理走 FAL 外部提供商从SELF_HOSTED_ECOSYSTEM_KEYS中未包含Reve亦可印证这一点。为什么用品牌名而非 Reve 2.1BaseModelRecord.name刻意取通用品牌名Reve而不是版本号Reve 2.1。这样未来的Reve 2.2只是同一生态下的另一个ModelVersion无需新增基座模型记录。这与 HappyHorse 的处理方式完全一致ECO.HappyHorse 52、BM.HappyHorse 85同一个HappyHorse基座模型下挂多个版本在生成图中按版本选择可参考 src/shared/data-graph/generation/happy-horse-graph.ts 与 src/shared/form-graph/generation/video/happy-horse.graph.ts 中对应的版本选择实现。这一约定保证了生态的纵向扩展只增加版本行不增加基座模型注册。变更一更新 ModelVersion.baseModel将版本3133202的baseModel字段从占位值SD 1.5改写为ReveUPDATE ModelVersion SET baseModel Reve WHERE id 3133202;执行此语句前请确认目标环境的分支已包含常量变更见上文前置条件否则Reve在 UI 与生成侧都无法解析为有效生态。变更二更新 Model.descriptionHTML 描述模型描述是包含单/双引号的 HTML 片段因此采用dollar-quoted字符串$md$…$md$包裹避免逐字符转义。将模型2781889的描述替换为 Reve 2.1 官方介绍UPDATE Model SET description $md$h2Reve 2.1/h2 pstrongReve 2.1/strong is a controllable text-to-image generation and editing model from a hrefhttps://reve.com relnoopener nofollow target_blankReve AI/a, an independent foundation-model lab. It is built on the idea that images should be composed like code — as hierarchical, structured regions — so that layout and control are core to the model rather than an afterthought./p h3Highlights/h3 ul listrongNative 4K output./strong Renders dense scenes, fine text, and intricate structure directly at 4K (16nbsp;megapixels), preserving detail through iterative refinement./li listrongLayout planning./strong Reasons about structure, hierarchy, and spatial relationships before rendering, so it holds up on complicated, densely populated scenes./li listrongEditability./strong Every element is addressable — a single region can be changed and re-rendered without redoing the whole image./li listrongMultilingual text./strong Renders legible typography, including foreign scripts embedded directly in the image./li /ul pReve 2.1 ranks as a top 4K model on the Arena and Design Arena leaderboards while using a fraction of the compute of comparably ranked models./p pemModel and imagery are the property of Reve AI, Inc. Learn more in the a hrefhttps://blog.reve.com/posts/launching-reve-2.1/ relnoopener nofollow target_blankReve 2.1 launch announcement/a. Use is subject to the a hrefhttps://app.reve.com/terms relnoopener nofollow target_blankReve AI Terms of Service/a./em/p$md$ WHERE id 2781889;这段描述遵循镜像模型的文案约定明确署名 Reve AI、保留外链relnoopener nofollow、target_blank属性、并声明模型与图像版权归属。描述中引用的https://app.reve.com/terms与licenses数组中id: 38记录保持一致见 packages/civitai-shared/src/basemodel.constants.ts。验证确认两处写入生效执行以下 JOIN 查询同时核验版本与模型两侧的数据SELECT mv.id AS version_id, mv.baseModel, m.id AS model_id, left(m.description, 60) AS desc_preview FROM ModelVersion mv JOIN Model m ON m.id mv.modelId WHERE mv.id 3133202;预期结果baseModel Revedesc_preview以h2Reve 2.1/h2开头left(..., 60)截取的前 60 字符。若在副本库replica上执行验证注意确认副本延迟replication lag确保读到的是主库同步后的最新数据。注意事项与回滚要点License URL 确认新许可证记录id 38Reve AI Terms of Service的 URL 为https://app.reve.com/terms。上线前请用目标环境对应的 Reve 账号确认该地址可正常访问若 Reve 官方发布不同的 canonical terms URL需要同时修改常量中的license.url与描述 HTML 里的条款链接保持两处一致。归属与链接描述中注明模型与图像版权归 Reve AI, Inc.并链接官方发布公告符合镜像模型挂在CivitaiOfficial账号下的既有署名约定。环境顺序建议按 preview → staging → prod 的顺序逐步应用每步执行后都跑一遍上面的验证 SQL确认后再推进到下一个环境。回滚方式由于是普通 UPDATE回滚即重新执行反向 UPDATE将baseModel改回SD 1.5、恢复原描述内容。文档未提供回滚脚本实际操作时建议在应用前保存目标行原始值可用SELECT先导出以便快速恢复。小结本次变更的核心是常量 数据双轨交付baseModel字符串在 packages/civitai-shared/src/basemodel.constants.ts 中通过ECO.Reve生态、BM.Reve基座模型、license 38条款三层注册获得语义SQL 侧则用两笔针对既有行的UPDATE完成数据落地并以一条 JOIN 查询收尾验证。理解了这套镜像模型数据更新 生态系统常量解析的配合方式后后续新增其他镜像模型如未来 Reve 2.2即可复用同一流程新增/确认生态常量 → 执行 UPDATE → 验证解析结果。【免费下载链接】civitaiA repository of models, textual inversions, and more项目地址: https://gitcode.com/GitHub_Trending/ci/civitai创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表