Current location: Home> ComfyUI Tutorial> Server Configuration - ComfyUI Settings Menu

Server Configuration - ComfyUI Settings Menu

Author: LoRA Time: 28 Mar 2025

ComfyUI Service Configuration Description

Current version description version: ComfyUI Desktop v0.4.5

The service configuration is configured on the server (host side) of ComfyUI Desktop. Here you can set the LAN access settings of ComfyUI, some operation accuracy settings, and some cache settings, etc. Since the corresponding content is translated from English, some menu content may not match the actual language settings. Please refer to the actual interface language.

Server configuration cannot be modified when accessed by other devices in the LAN

In the Portable version, please use setting -listen in the .bat file to set LAN access using the LAN

network

Listen address

Function: Set the IP address of the server to listen. Usually, it is only possible to keep the default.

Default value: 127.0.0.1 (only local access is allowed for host)

Port (port)

Function: Set the port number for the server to listen. Make sure that the port is not occupied by other applications.

Default value: 8000 (just like the home number, it generally does not need to be modified, it only needs to be modified when software conflicts)

TLS key file (tls-keyfile) and TLS certificate file (tls-certfile)

Function: Used to set up a secure connection for HTTPS. If HTTPS is not required, it can be ignored.

Enable CORS header

Features: Allow other websites to access your server. Use "*" to allow access to all websites.

Maximum upload size (max-upload-size)

Function: Limit the maximum size of uploaded files in MB.

Default value: 100 (just like the maximum capacity of a suitcase)

If you want to set up LAN access to ComfyUI, then you need to set the listening address to 0.0.0.0 , port to 8000 or other ports, and then access the LAN IP address and port of the corresponding host through other LAN devices. For example, the corresponding LAN IP is 192.168.1.100 and port to 8000, then other devices can access ComfyUI through http://192.168.1.100:8000

This is similar to the early Portable version of ComfyUI setting -listen 0.0.0.0 in the .bat file, but now it is more convenient to set it in ComfyUI Desktop

CUDA Settings

CUDA device (cuda-device)

Function: Select the graphics card to use

Common explanation: If you have multiple graphics cards, you can choose which one to use. Just like having multiple studios, choose which studio to work in

Options:

0: The first graphics card

1: The second graphics card (if any)

null: Automatic selection

Suggestion: Users with only one graphics card can keep the default

Use CUDA malloc for memory allocation (cuda-malloc)

Function: Determine the allocation method of graphics card memory

Popular explanation: It's like deciding how to arrange a studio's workspace

Options:

Options describe Applicable scenarios
automatic Let the system automatically decide the best way Recommended for beginners
Enable Use more aggressive memory allocation When more video memory is needed
Disabled Use conservative memory allocation When encountering video memory problems

reasoning

Precision: Just like the level of detail when drawing. High precision is like drawing with fine strokes, with many details but slow drawing; low precision is like drawing with thick strokes, with fast speed but may lose details.

Global floating-point precision (global-precision)

Function: Control the accuracy of overall operation

Options:

Options describe Use scenarios
AUTO Automatically select the most suitable accuracy, recommended for beginners Suitable for most situations
FP32 The highest accuracy mode is like looking at pictures with a microscope When you need the best image quality
FP16 Lower precision but faster, just like looking at pictures with the naked eye When you want faster generation speed

UNET precision (unet-precision)

Function: Control the accuracy of the core parts of AI painting

Note: UNET is the "brush" of AI painting, which determines how to turn your text into images

Options:

Options describe Applicable scenarios
AUTO Automatic selection, recommended for beginners Suitable for most situations
FP32 Highest quality, but slower When the best quality is needed
FP16 Balance mode, moderate speed and quality Daily use
BF16 Special balance mode, suitable for some new graphics cards Use of specific graphics cards

VAE precision (vae-precision)

Function: VAE (variable autoencoder) is the component responsible for the final image detail processing, just like the painter's "coloring and embellishment" technique

Popular explanation: Determines the fineness of the final image, just like the painter's final retouching work

Options:

Options describe Applicable scenarios
AUTO Automatically select the right accuracy Recommended for beginners
FP16 Faster but maybe slightly less details When a quick generation is needed
FP32 Best quality but slower When the best quality is needed
BF16 Between FP16 and FP32 Use of a specific new graphics card

Run VAE on the CPU (cpu-vae)

Function: Let the CPU handle the final image modification work

Common explanation: It's like letting the housekeeper (CPU) do the finishing work of the painter (GPU)

Applicable scenarios:

When the graphics card is insufficient

When you need to process large pictures

When the graphics card performance is insufficient

Text-encoder-precision

Function: Controls the accuracy of AI understanding of text descriptions

Popular explanation: Just like the carefulness of the painter when he understands your request

Options:

Options describe Applicable scenarios
AUTO Automatically select the most suitable accuracy Recommended for beginners
FP32 The most careful way to understand, but slower When you need to understand the prompt words accurately
FP16 Quickly understand, maybe slightly biased When faster speed is needed
BF16 A balance mode between the two Optimization options for specific graphics cards

Memory

Force the use of channels-last memory format (force-channels-last)

Function: Change the arrangement of image data in memory

Common explanation: Just like changing the order of tools in the studio, it can sometimes improve efficiency

Suggestion: Keep the default value unless you understand the impact of this setting

DirectML Device Index (directml)

Function: Select DirectML device

Common explanation: A special painting mode, mainly used in AMD graphics cards

Applicable scenarios: Users using AMD graphics cards may need to set this item

Disable-ipex-optimize

Features: Disable IPEX optimization. Usually no changes are required.

Default value: false

Disable-smart-memory

Function: Disable smart memory management. Usually no changes are required.

Default value: false

Preview settings

Preview-method

Function: Control the preview method during the generation process

Common explanation: Just like whether to see the creative process of the painter

Options:

Options describe Applicable scenarios
NoPreviews No preview is displayed When the fastest speed is needed
Latent Showing a fuzzy creative process When you want to see the progress
Taesd Show clearer creative process When you think clearly about the progress

Preview image size (preview-size)

Function: Set the size of the preview window

Popular explanation: Just like deciding the size of a draft

Suggested values:

General use: 512

When performance is insufficient: 256

When performance is sufficient: you can set larger

cache

Using a classic cache system (cache-classic)

Function: Use traditional cache management method

Common explanation: Just like a painter sorts out painting tools and materials in a fixed way

Applicable scenarios:

When the system is sufficient

When stable performance is required

Suggestion: Keep the default value unless you encounter memory problems

Using LRU cache (cache-lru)

Function: Set the most recently used data cache

Common explanation: Just as the painter only retains the tools and pigments that have been used recently

Applicable scenarios:

Limited time memory

When balancing performance and memory usage is required

Suggested values:

8GB memory: set to 2-3

16GB memory: set to 4-6

32GB and above: Set to 8-12

Attention Settings

Cross-attention-method

Function: How to control how AI understands text and converts it into images

Popular explanation: Just like the way a painter understands your requirements and conceives in his mind

Options:

Options describe Applicable scenarios
auto Automatically choose the most suitable method Recommended for beginners
split Save video memory but may be slower When the video memory is insufficient
quad Traditional, stable but slow When stable effects are required
pytorch Using PyTorch native When encountering compatibility issues

Force-attention-upcast

Function: Force the use of higher precision treatment attention mechanism

Common explanation: It is like letting the painter think about every detail more carefully

Applicable scenario: When the generated image details are not ideal

Prevent-attention-upcast

Function: Disable the use of higher precision processing attention mechanism

Common explanation: Let the painter draw quickly without paying too much attention to details

Applicable scenarios: When faster generation speed is required

VRAM Management

VRAM management mode (vram-management)

Function: Control how graphics card memory is used

Common explanation: Just like managing the use of space in the studio

Options:

Options describe Applicable
Auto Automatic management is like a housekeeper helping you clean up the painting room Recommended for beginners
Full Use all available spaces When the video memory is sufficient
Low Save space When the video memory is insufficient

Reserve VRAM (reserve-vram)

Function: Reserve graphics card memory for other programs

Common explanation: It's like leaving some space in the studio for other purposes

Use scenarios:

If you run other programs that require graphics cards at the same time (such as games)

Suggested value: Set according to other program requirements, usually 2-4GB is enough

conventional

Disable-xformers optimization (disable-xformers)

Features: Disable xFormers to accelerate optimization

Common explanation: xFormers is like a painter's quick painting technique, disabling it will allow the painter to paint in traditional ways

Suggestion: Unless you encounter problems, it is recommended to keep it enabled (not checked)

The default hashing function of the model file (default-hashing-function)

Function: Choose a method to check the integrity of the model file

Common explanation: Just like checking whether the painting tool is intact

Options:

Options describe
sha256 The most commonly used inspection method, reliable and safe

Using pytorch to use slower randomness algorithms when possible

Features: Use more stable but slower random algorithms in some cases

Common explanation: It's like letting painters create randomly in a more traditional but stable way

Suggestion: Generally, no need to enable it

Enable some untested optimizations that may reduce quality

Function: Use some experimental optimization methods

Common explanation: Try some new quick drawing techniques, but may affect the quality of the painting

Suggestion: It is not recommended to enable it when pursuing stable effects.

Do not print server output to console

Function: No background running log is displayed

Common explanation: Let the painter work quietly without reporting every detail

Suggestions: It is recommended to close when troubleshooting (not checked)

Disable saving prompt word data in a file

Function: Do not save prompt word information in the generated image file

Common explanation: The recipe for not recording creation behind the painting

Applicable scenario: When you want to keep the prompt word private

Disable loading of all custom nodes

Function: Disable loading of all custom function modules

Common explanation: only use basic tools, no additional special tools

Applicable scenarios: When you want the most basic and stable experience

Log-level level (log-level)

Function: Set the detailed level of system log display

Common explanation: Just like setting the degree of detail of the painter's report work

Options:

Options describe Applicable scenarios
DEBUG Show all details, including debugging information Use it when the developer needs to troubleshoot specific problems
INFO Display general information, including operation and status prompts Recommended daily use, you can see important information
WARNING Show only warnings and error messages Just want to see a reminder of possible problems
ERROR Show only error messages Focus only on serious problems
CRITICAL Show only fatal error messages Just want to see the most serious problem

Directory settings

Input-directory

Function: Set the directory of the input file.

Default value: empty string

Output-directory

Function: Set the directory of the output file.

Default value: empty string