官方权威的 Image generation 图像生成

了解更多ChatGPT知识:ChatGPT与日本首相交流核废水事件-精准Prompt...

hello,我是小索奇,最近DALL再一次火爆,这里把官方图像生成的全部介绍给大家翻译成中文(双语),可以借鉴学习,一定是权威的。

这里把官方图像生成的全部介绍给大家翻译成中文(双语),可以借鉴学习,一定是权威的。

Image generation 图像生成

Learn how to generate or manipulate images with our DALL·E models了解如何使用我们的 DALL·E 型号

Introduction 介绍

The Images API provides three methods for interacting with images: 图像 API 提供了三种与图像交互的方法:

  1. Creating images from scratch based on a text prompt 根据文本提示从头开始创建图像

  2. Creating edits of an existing image based on a new text prompt 根据新的文本提示创建现有图像的编辑

  3. Creating variations of an existing image 创建现有图像的变体

This guide covers the basics of using these three API endpoints with useful code samples. To see them in action, check out our DALL·E preview app. 本指南介绍了使用这三个 API 终结点的基础知识以及有用的代码示例。要了解它们的实际效果,请查看我们的 DALL·E 预览应用程序。

Usage 用法

Generations 代

The image generations endpoint allows you to create an original image given a text prompt. Generated images can have a size of 256x256, 512x512, or 1024x1024 pixels. Smaller sizes are faster to generate. You can request 1-10 images at a time using the n parameter. 

图像生成终结点允许您在给定文本提示的情况下创建原始图像。生成的图像的大小可以是 256x256、512x512 或 1024x1024 像素。较小的尺寸生成速度更快。您可以使用 n 参数一次请求 1-10 张图像。

 

response = openai.Image.create(
prompt="a white siamese cat",
n=1,
size="1024x1024"
)
image_url = response['data'][0]['url']

The more detailed the description, the more likely you are to get the result that you or your end user want. You can explore the examples in the DALL·E preview app for more prompting inspiration. Here's a quick example:

描述越详细,就越有可能获得您或您的最终用户想要的结果。您可以在 DALL·E 预览应用程序,以获得更多提示灵感。下面是一个快速示例:

PROMPT 提示GENERATION 代

<
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值