Skip to content

Elastic Compute ​

Elastic Compute Beta lets DFCine automatically select a lower-load online instance from the configured ComfyUI targets that are allowed to participate in scheduling. You can switch back to the original manual selection mode at any time.

Elastic Compute only affects workflows with the ComfyUI runner. External API workflows such as Alibaba Cloud Model Studio, xAI, and APIMart continue to use their own API configuration and execution path. They do not query or consume ComfyUI compute targets.

Before You Start ​

Elastic mode requires at least one configured ComfyUI target. You can enable it with only one target; DFCine will still check whether that target is online before execution.

The following targets can participate in Elastic Compute:

  • Local ComfyUI: select and save a ComfyUI startup script in Settings. The local target appears in Compute Control after it is configured.
  • Xiangongyun: enter the container ID and port under Settings > Cloud Compute, then save the instance.
  • AutoDL: enter and save the complete ComfyUI service address under Settings > Cloud Compute.
  • LightCC: enter and save the complete HTTPS ComfyUI service address under Settings > Cloud Compute.
  • Custom ComfyUI: enter and save an accessible HTTP or HTTPS ComfyUI service address under Settings > Cloud Compute.

Each remote target has a Use for elastic scheduling switch. If you turn it off, the instance remains available in Manual mode but is excluded from Elastic Compute. Targets without a complete saved configuration are not shown in Compute Control on the canvas.

Enable Elastic Compute ​

  1. Open a canvas and open Compute Control from the top toolbar.
  2. Confirm that the local and remote ComfyUI targets you want to use are listed.
  3. Select Elastic Compute Beta.
  4. The panel shows the number of enabled candidates and the connection state of each target.
  5. Run a node on the canvas as usual.

In Elastic mode, Candidate means that the target is enabled for scheduling. It does not guarantee that the target is currently online. Use the Connected or Disconnected state to understand the latest connection check.

How a Target Is Selected ​

Whenever you run a ComfyUI workflow, DFCine queries the /queue endpoint of all candidates in parallel. It reads the running and pending task counts, then selects an online instance with a lower effective load.

  • If an idle target is available, DFCine favors an idle instance with a lower load.
  • If every target is busy, DFCine favors the instance with fewer running and queued tasks.
  • When multiple instances have the same load, recent assignment history and configuration order are used to balance selections.
  • When several tasks are submitted in quick succession, DFCine tracks recent assignments that may not yet appear in the ComfyUI queue. This reduces the chance that all new tasks are sent to the same instance.
  • A target that returns an error, times out, responds with HTTP 503, or cannot be reached is skipped for that allocation. It can participate again automatically after it becomes reachable.
  • If every candidate is offline or unreachable, the run fails with a no-available-compute message. DFCine does not submit the task to an offline instance.

The pre-run check is normally quick. If a remote address cannot be reached, there may be a short delay while its connection attempt times out.

View Tasks and Progress ​

After allocation, the canvas node continues to show its execution state. The selected target and its task details are available on the corresponding card in Compute Control. The card displays:

  • the current task name;
  • running and queued task counts;
  • a progress bar and value such as 1/8 when ComfyUI reports progress.

Select the task summary below a compute card to open the full Tasks panel, where you can inspect or cancel tasks.

Each task is bound to its selected target when it is submitted. Switching to Manual mode or manually selecting another target does not migrate or interrupt tasks that have already been submitted. New ComfyUI tasks use the newly selected mode.

Return to Manual Mode ​

Open Compute Control and select Manual to restore the original behavior. In Manual mode, selecting a local or remote target in the list pins subsequent ComfyUI workflows to that instance.

In Elastic mode, target rows only show candidate eligibility, connection state, and task progress. Selecting a target row does not silently exit Elastic mode.

Model Checks and Input Files ​

  • When a workflow is allocated to Local ComfyUI, the existing local model and path checks still apply.
  • When it is allocated to a remote or cloud ComfyUI target, the existing cloud execution behavior is preserved. DFCine does not check whether the required models are installed on the local computer.
  • Images, videos, and other required inputs are uploaded according to the selected remote target configuration.

Notes ​

  • Candidate ComfyUI services must be reachable from the current computer and provide the standard /queue, /prompt, WebSocket, history, and related endpoints.
  • A task is not automatically migrated if its assigned instance disconnects after execution begins.
  • Clearing a configuration or disabling elastic scheduling only affects new tasks. Existing task bindings are preserved.
  • If you clear or disable the final candidate, switch back to Manual mode or enable at least one candidate before the next ComfyUI run.
  • In the current Beta, the global Clear memory and VRAM action still applies to the last manually selected ComfyUI target. It does not clear every Elastic Compute candidate. Confirm the target before using it so that you do not affect a running task.

DFCine documentation site.