OpenAI DALL·E 2 node screenshot OpenAI DALL·E 2 is part of the ComfyUI API Nodes series, allowing users to generate images through OpenAI’s DALL·E 2 model. This node supports:
  • Text-to-image generation
  • Image editing functionality (inpainting through masks)

Node Overview

The OpenAI DALL·E 2 node generates images synchronously through OpenAI’s image generation API. It receives text prompts and returns images that match the description.
To use the API nodes, you need to ensure that you are logged in properly and using a permitted network environment. Please refer to the API Nodes Overview section of the documentation to understand the specific requirements for using the API nodes.
Make sure your ComfyUI is updated.Workflows in this guide can be found in the Workflow Templates. If you can’t find them in the template, your ComfyUI may be outdated.(Desktop version’s update will delay sometime)If nodes are missing when loading a workflow, possible reasons:
  1. You are not using the latest ComfyUI version(Nightly version)
  2. You are using Stable or Desktop version (Latest changes may not be included)
  3. Some nodes failed to import at startup

Parameter Description

Required Parameters

ParameterDescription
promptText prompt describing the image content you want to generate

Widget Parameters

ParameterDescriptionOptions/RangeDefault Value
seedSeed value for image generation (currently not implemented in the backend)0 to 2^31-10
sizeOutput image dimensions”256x256”, “512x512”, “1024x1024""1024x1024”
nNumber of images to generate1 to 81

Optional Parameters

ParameterDescriptionOptions/RangeDefault Value
imageOptional reference image for image editingAny image inputNone
maskOptional mask for local inpaintingMask inputNone

Usage Method

Workflow Examples

This API node currently supports two workflows:
  • Text to Image
  • Inpainting
Image to Image workflow is not supported

Text to Image Example

The image below contains a simple text-to-image workflow. Please download the corresponding image and drag it into ComfyUI to load the workflow.
ComfyUI openai-dall-e-2 workflow
The corresponding example is very simple ComfyUI openai-dall-e-2 workflow example You only need to load the OpenAI DALL·E 2 node, input the description of the image you want to generate in the prompt node, connect a Save Image node, and then run the workflow.

Inpainting Workflow

DALL·E 2 supports image editing functionality, allowing you to use a mask to specify the area to be replaced. Below is a simple inpainting workflow example:

1. Workflow File Download

Download the image below and drag it into ComfyUI to load the corresponding workflow.
ComfyUI openai-dall-e-2 workflow
We will use the image below as input:
ComfyUI openai-dall-e-2 workflow input

2. Workflow File Usage Instructions

ComfyUI openai-dall-e-2 workflow example Since this workflow is relatively simple, if you want to manually implement the corresponding workflow yourself, you can follow the steps below:
  1. Use the Load Image node to load the image
  2. Right-click on the load image node and select MaskEditor
  3. In the mask editor, use the brush to draw the area you want to redraw
  4. Connect the loaded image to the image input of the OpenAI DALL·E 2 node
  5. Connect the mask to the mask input of the OpenAI DALL·E 2 node
  6. Edit the prompt in the prompt node
  7. Run the workflow
Notes
  • If you want to use the image editing functionality, you must provide both an image and a mask (both are required)
  • The mask and image must be the same size
  • When inputting large images, the node will automatically resize the image to an appropriate size
  • The URLs returned by the API are valid for a short period, please save the results promptly
  • Each generation consumes credits, charged according to image size and quantity

FAQs

Please update your ComfyUI to the latest version (the latest commit or the latest desktop version). We may add more API support in the future, and the corresponding nodes will be updated, so please keep your ComfyUI up to date.
Please note that you need to distinguish between the nightly version and the release version. In some cases, the latest release version may not be updated in time compared to the nightly version. Since we are still iterating quickly, please ensure you are using the latest version when you cannot find the corresponding node.
API access requires that your current request is based on a secure network environment. The current requirements for API access are as follows:
  • The local network only allows access from 127.0.0.1 or localhost, which may mean that you cannot use the API Nodes in a ComfyUI service started with the --listen parameter in a LAN environment.
  • Able to access our API service normally (a proxy service may be required in some regions).
  • Your account does not have enough credits.
  • Currently, only 127.0.0.1 or localhost access is supported.
  • Ensure your account has enough credits.
API Nodes require credits for API calls to closed-source models, so they do not support free usage.
Please refer to the following documentation:
  1. Comfy Account: Find the User section in the settings menu to log in.
  2. Credits: After logging in, the settings interface will show the credits menu. You can purchase credits in SettingsCredits. We use a prepaid system, so there will be no unexpected charges.
  3. Complete the payment through Stripe.
  4. Check if the credits have been updated. If not, try restarting or refreshing the page.
Currently, we do not support refunds for credits. If you believe there is an error resulting in unused balance due to technical issues, please contact support.
Credits cannot go negative, so please ensure you have enough credits before making the corresponding API calls.
Please visit the Credits menu after logging in to check the corresponding credits.
Currently, the API Nodes are still in the testing phase and do not support this feature yet, but we have considered adding it.
No, your credits do not expire.
No, your credits cannot be transferred to other users and are limited to the currently logged-in account, but we do not restrict the number of devices that can log in.
We do not limit the number of devices that can log in; you can use your account anywhere you want.
Email a request to support@comfy.org and we will delete your information