Replicate.com:使用Methexis Inc的Img2Prompt工具生成与图像风格紧密匹配的文本提示。优化为稳定扩散(clip ViT-L/14)。

在 Replicate 上使用 Methexis-Inc Img2prompt API

简介

什么是methexis-inc/img2prompt?

methexis-inc/img2prompt是一个模型,用于生成与图像匹配的带有风格的近似文本提示。它经过优化,适用于稳定扩散(clip ViT-L/14)。

如何使用methexis-inc/img2prompt

您可以通过各种方法使用methexis-inc/img2prompt,包括Node.js、Python、Elixir、HTTP、Cog和Docker。以下是如何使用该模型的一些示例:

Node.js

const replicate = new Replicate({
  auth: process.env.REPLICATE_API_TOKEN,
});

const output = await replicate.run(
  "methexis-inc/img2prompt:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5",
  {
    input: {
      image: "https://replicate.delivery/mgxm/8b4d747d-feca-477d-8069-ee4d5f89ad8e/a_high_detail_shot_of_a_cat_wearing_a_suit_realism_8k_-n_9_.png"
    }
  }
);
console.log(output);

Python

import replicate

output = replicate.run(
    "methexis-inc/img2prompt:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5",
    input={
        "image": "https://replicate.delivery/mgxm/8b4d747d-feca-477d-8069-ee4d5f89ad8e/a_high_detail_shot_of_a_cat_wearing_a_suit_realism_8k_-n_9_.png"
    }
)
print(output)

Elixir

output = Replicate.run(
  "methexis-inc/img2prompt:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5",
  %{
    image: "https://replicate.delivery/mgxm/8b4d747d-feca-477d-8069-ee4d5f89ad8e/a_high_detail_shot_of_a_cat_wearing_a_suit_realism_8k_-n_9_.png"
  }
)
IO.inspect(output)

HTTP

curl -s -X POST \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d $'{
    "version": "50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5",
    "input": {
      "image": "https://replicate.delivery/mgxm/8b4d747d-feca-477d-8069-ee4d5f89ad8e/a_high_detail_shot_of_a_cat_wearing_a_suit_realism_8k_-n_9_.png"
    }
  }' \
  https://api.replicate.com/v1/predictions

Cog

cog predict r8.im/methexis-inc/img2prompt@sha256:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5 \
  -i 'image="https://replicate.delivery/mgxm/8b4d747d-feca-477d-8069-ee4d5f89ad8e/a_high_detail_shot_of_a_cat_wearing_a_suit_realism_8k_-n_9_.png"'

Docker

docker run -d -p 5000:5000 --gpus=all r8.im/methexis-inc/img2prompt@sha256:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5
curl -s -X POST \
  -H "Content-Type: application/json" \
  -d $'{
    "input": {
      "image": "https://replicate.delivery/mgxm/8b4d747d-feca-477d-8069-ee4d5f89ad8e/a_high_detail_shot_of_a_cat_wearing_a_suit_realism_8k_-n_9_.png"
    }
  }' \
  http://localhost:5000/predictions

methexis-inc/img2prompt的特点

该模型提供了近似文本提示,可与稳定扩散一起使用,以重新创建图像/绘画的类似外观版本。这是由@pharmapsychotic稍微改编的CLIP Interrogator笔记本的版本。

methexis-inc/img2prompt的定价

methexis-inc/img2prompt的定价未指定。但是,该模型在Nvidia T4 GPU硬件上运行,通常在51秒内完成预测。该模型的预测时间会根据输入的不同而显著变化。

在 - 可选替代

无限制聊天机器人:FreeUnlimitedChatBot 在 Netlify 上

Freeunlimitedchatbot.netlify.app: 使用FreeUnlimitedChatBot免费创建无限制的聊天机器人。这款由Abdusamad开发的人工智能聊天机器人具有图像创建和问答功能。由Stork.AI提供支持,这款生成式人工智能聊天机器人是网页开发人员寻求在其网站上实现无限制聊天机器人解决方案的完美工具。立即在Netlify上探索Talk-Bot的可能性。

--
使用AI创建病毒式短视频 - 短视频生成器

Shortsgenerator.com:使用Shorts Generator在几分钟内创建病毒式短视频,这是一款由人工智能驱动的在线视频制作工具。探索定价计划、常见问题和简化YouTube自动化,为下一个病毒视频创作做好准备。

--
Swapr LOL | AI换脸, AI表情符号, LOL惊喜娃娃

Swapr.lol:Swapr LOL是最终的人工智能换脸和表情符号应用。轻松交换面孔,用Swapr LOL创建滑稽的表情符号。享受与LOL惊喜娃娃和惊喜交换宝宝交换面孔的乐趣。加入Swapr LOL的乐趣!

--
更多相关标签: 在 Replicate 上使用 Methexis-Inc Img2prompt API