像素艺术生成模型现已上线

Retro Diffusion的像素艺术模型现已上线

Retro Diffusion精心打造了一套用于创建游戏资源、角色精灵、贴图和其他精美复古图形的模型和风格。这些模型专门针对网格对齐、有限调色板的像素艺术进行训练。现在,您可以在Replicate上运行它们。

Retro Diffusion在Replicate上拥有四个模型:

  • rd-fast: 一个专门用于快速生成像素艺术图像的网址链接。
  • rd-plus: 一个用于生成高质量、逼真像素艺术图像的网址链接。
  • rd-tile: 一个专注于生成像素艺术贴图集的网址链接。
  • rd-animation: 一个用于生成风格一致的动画像素艺术精灵的网址链接。

这些模型提供了大量不同的风格预设可供使用,并且大多数支持任意宽度/高度、输入图像、调色板图像、背景去除和无缝平铺。

rd-fast: 快速像素艺术图像生成

retro-diffusion/rd-fast 针对速度进行了优化,支持15种风格,从肖像到某风格物品。

import replicate

output = replicate.run(
    "retro-diffusion/rd-fast",
    input={
        "prompt": "knight character, retro game asset, side view",
        "style": "game_asset",
        "width": 128,
        "height": 128,
        "num_images": 1,
        "remove_bg": True,
    },
)
print(output)

rd-plus: 高质量、逼真的像素艺术图像生成

retro-diffusion/rd-plus 是更高质量的文本到图像模型,提供场景、地图、用户界面和图标等风格。

import replicate

output = replicate.run(
    "retro-diffusion/rd-plus",
    input={
        "prompt": "top-down forest path with trees and rocks, classic jrpg map",
        "style": "topdown_map",
        "width": 256,
        "height": 256,
        "num_images": 1,
        "tile_x": True,
        "tile_y": True,
    },
)
print(output)

rd-tile: 生成像素艺术贴图集所需的全部工具

retro-diffusion/rd-tile 专注于贴图和贴图集,包括单个贴图、变体和场景对象。

import replicate

output = replicate.run(
    "retro-diffusion/rd-tile",
    input={
        "prompt": "grass and dirt path tileset with stones and flowers",
        "style": "tileset",
        "width": 32,  # tile width
        "height": 32,  # tile height
        "num_images": 1,
    },
)
print(output)

rd-animation: 风格一致的动画像素艺术精灵生成

retro-diffusion/rd-animation 生成动画精灵或精灵表,具有一致的帧结构和较低的帧数,以匹配常见的游戏引擎。

import replicate

output = replicate.run(
    "retro-diffusion/rd-animation",
    input={
        "prompt": "small pirate character with parrot, walking animation",
        "style": "four_angle_walking",
        "width": 48,
        "height": 48,
        "return_spritesheet": True,
    },
)
print(output)

这些示例使用了Python,但您也可以通过某中心的软件开发工具包从JavaScript和其他语言调用这些模型。
更多精彩内容 请关注我的个人公众号 公众号(办公AI智能小助手)或者 我的个人博客 https://blog.qife122.com/
对网络安全、黑客技术感兴趣的朋友可以关注我的安全公众号(网络安全技术点滴分享)

公众号二维码

公众号二维码

posted @ 2026-01-13 16:16  CodeShare  阅读(0)  评论(0)    收藏  举报