🔥 L40s Server Is Now Live – Just 0.83 credits/hr!
How to Run Any ComfyUI Workflow on Glows.ai
Tutorial

How to Run Custom ComfyUI Workflows on Glows.ai

This tutorial will guide you through renting an NVIDIA GeForce RTX 4090 GPU on Glows.ai and using ComfyUI for AI image generation.

This article covers:

  • How to create an instance on Glows.ai
  • Basic operations of ComfyUI
  • How to call ComfyUI via code
  • Common issues with ComfyUI

ComfyUI is a graphical user interface (GUI) designed for AI diffusion models like Stable Diffusion (SD), greatly simplifying the image generation process. With intuitive drag-and-drop operations, users can quickly adjust model parameters and generate images without coding. Compared to traditional SDWebUI, ComfyUI offers more customization options, supports more flexible model management and parameter tuning, and allows for finer control. In addition, ComfyUI is optimized for performance.

Creating an Instance

You can create an instance on Glows.ai as needed. For detailed steps, refer to the official guide. Be sure to select the ComfyUI FLUX.1-Kontext (img-87p9kkq2) image, which comes with the environment pre-configured.

On the Create New page, set Workload Type to Inference GPU -- 4090, and select the ComfyUI FLUX.1-Kontext image. This image has all dependencies pre-installed and starts the ComfyUI service, which listens on port 8188.

image-20250822161348968

Datadrive is Glows.ai’s cloud storage service. You can upload data, models, or code to Datadrive before creating an instance. When creating the instance, click the Mount button to mount Datadrive to your instance, allowing direct read/write access.

This tutorial demonstrates inference only, so mounting Datadrive is not required.

Once everything is set, click Complete Checkout at the bottom right to finish creating the instance.

image-20250822161748705

The ComfyUI FLUX.1-Kontext image takes about 30-60 seconds to start. Once started, you can view the instance status and details on the My Instances page:

  • SSH Port 22: SSH connection port
  • HTTP Port 8888: JupyterLab interface
  • HTTP Port 8188: ComfyUI interface

image-20250822162042439

Using ComfyUI FLUX.1-Kontext

Click the Open link under HTTP Port 8188 to launch ComfyUI. In the popup, select the desired Workflow template. To run the FLUX.1-Kontext model, choose Flux and select the corresponding Workflow, such as Flux Knotext Dev(Basic).

image-20250730155555643

After selecting a Workflow, the system will automatically check if all required models are present. If any are missing, ComfyUI will display an error message indicating which models are missing and where to place them.

image-20250730160248722

If you use the ComfyUI FLUX.1-Kontext image, you won’t encounter missing model errors, as all necessary models are pre-installed. Once the Workflow loads, you’ll see all nodes and their connections.

image-20250730165117815

If you run the Workflow directly, you may see errors, such as needing to place an image in the /ComfyUI/output folder.

image-20250730174321087

You can also click the choose file to upload button under the Load Image node in the interface to upload an image from your local machine.

image-20250822164751801

Next, modify the prompt and click RUN to generate an image. During computation, the GPU usage is about 18GB, with 100% memory utilization.

image-20250730170653378

Generating an image with the FLUX.1-Kontext model on a 4090 takes about 23 seconds.

image-20250730174225069

The generated images are saved in the /ComfyUI/output folder on your Glows.ai instance. You can download them directly from this folder or via the ComfyUI interface.

image-20250730180046094

How to Call ComfyUI via Code

ComfyUI provides an API mode for advanced users. First, click Workflow -- Export(API) in the top left of the interface to export the Workflow in API format.

image-20250825152848035

Refer to the official script_examples for sample code. Replace the prompt section as needed.

Common Issues with ComfyUI

How to Restart or Update ComfyUI?

Some operations may require restarting ComfyUI. Click the Manager button in the top right, then click Restart in the popup. The ComfyUI Manager plugin offers many other features—feel free to explore.

image-20250825173959663

How to Set the Default Workflow to Load?

Click the Workflow button in the top left, then select Browse Templates in the popup to view all official Workflows.

image-20250825174202352

Select the Workflow you want to run.

image-20250825174359845

If any models are missing, a prompt will appear. Click Copy URL, then download the model to the correct folder inside your instance. After downloading, close the popup.

image-20250825174729730

The default ComfyUI project path is /ComfyUI, but sometimes it is /root/ComfyUI. Model files are stored in the models folder under the project path. Download models according to the actual path.

bash
# Example for project path /ComfyUI
cd /ComfyUI/models/
wget -O checkpoints/dreamshaper_8.safetensors "https://civitai.com/api/download/models/128713?type=Model&format=SafeTensor&size=pruned&fp=fp16"
wget -O loras/MoXinV1.safetensors "https://civitai.com/api/download/models/14856?type=Model&format=SafeTensor&size=full&fp=fp16"
wget -O loras/blindbox_v1_mix.safetensors "https://civitai.com/api/download/models/32988?type=Model&format=SafeTensor&size=full&fp=fp16"

image-20250825175748049

After downloading, check the model files.

image-20250825180416687

Once the models are downloaded, refresh the interface to run the related Workflow.

image-20250825180700837

ComfyUI Interface Not Displaying Properly After Adding Models?

Make sure the models are placed in the correct folder. The default model path is the models folder under the ComfyUI working directory.

For example, if the working directory is /ComfyUI, the model path is /ComfyUI/models

image-20250825180810018


Contact Us

If you have any questions or suggestions while using Glows.ai, feel free to contact us via Email, Discord, or Line.

Glows.ai Email: support@glows.ai

Discord: https://discord.com/invite/glowsai

Line: https://lin.ee/fHcoDgG