A separate machine-learning worker can take load off a small photo server. It also changes which machine receives image data. In Immich’s remote machine-learning setup, the server sends image previews to the machine-learning worker. Treat the worker as part of your private photo setup even if it never stores the originals.
Before enabling it on a real library, write down the two machines you expect to be involved. Use a test library with a synthetic image you made yourself. Start one Smart Search or Face Detection job and check the application’s job status and the logs of your own worker. Record whether the worker handled the job and whether the application completed it. Do not log or save image request bodies to prove a route.
Next, in the test environment, stop only the remote worker. Start a fresh eligible job. If your local worker is also configured, check whether it picks up the task. If you configured the remote worker as the only URL, the documentation says these jobs will fail while it is unavailable. A successful search for an already-indexed picture is not evidence that a new indexing job can run.
Keep the worker on a private network you control. Immich documents it as an internal service and warns against exposing it as though it were a public application. If sending even reduced previews to another machine is outside your privacy boundary, retain local processing.
Source: Immich’s remote machine-learning guide. AI assisted with drafting. The procedure describes checks to run, not results from a deployed library.
]]>When an album importer sees two pictures stamped 01:30 on the same day, it can be tempting to treat the timestamp as evidence that the pictures belong to the same burst. On the night clocks move back, that local time can occur twice. The camera text alone cannot say which instant it represents.
In a migration report, keep the source timestamp as written, the recorded offset if there is one, and the provenance of any time-zone setting you add. If the device recorded only a local time, mark the instant as unresolved until you have enough context. The day shown in a viewer can still help locate an event, even when precise ordering is unknown.
Here is a synthetic fixture for Los Angeles. Set both fold values and convert each result to UTC before comparing them. This illustrates an ambiguity for a known zone and transition date. It does not infer a zone from an image.
from datetime import datetime, timedelta, timezone
from zoneinfo import ZoneInfo
zone = ZoneInfo("America/Los_Angeles")
wall_time = datetime(2025, 11, 2, 1, 30)
earlier = wall_time.replace(tzinfo=zone, fold=0).astimezone(timezone.utc)
later = wall_time.replace(tzinfo=zone, fold=1).astimezone(timezone.utc)
assert later - earlier == timedelta(hours=1)
print(earlier.isoformat())
print(later.isoformat())
The example prints 08:30 UTC and 09:30 UTC on the same date. The test uses Python 3.9 or newer and an available IANA time-zone database.
Treat a timestamp match as a reason to compare two files, not a reason to discard either one. If the source includes a trustworthy offset, normalize the instant to UTC for sorting while retaining the original text. If the offset is missing and the hour is ambiguous, keep both entries visible and group only on evidence suitable for that purpose, such as exact-byte comparison or a reviewer-confirmed event.
Reference: Python zoneinfo documentation. AI assisted with drafting. The timestamps are synthetic and the two outcomes were checked locally.
]]>A self-hosted photo indexer can show an empty duplicate list for two very different reasons. A complete scan may find no candidates. A scan that loses a network mount halfway through may simply never reach the directory containing them. If both cases write an empty report to the dashboard, the operator has no way to tell which happened.
Imagine a small album service with one local folder and one NAS share. Monday's job scanned both and found three candidate pairs. Tuesday's job read the local folder and failed when it reached the share. The useful dashboard state is “Tuesday incomplete; last complete report Monday, 3 candidates.” That count describes Monday's scan. The Tuesday view should show which root failed and which roots finished.
Give the run an ID, a configuration revision, and a list of expected roots. For each root, keep its completion status and any read error. A root that reports zero files can finish successfully, provided the worker has verified that the expected source is available. A missing mount can leave an ordinary empty directory behind, so an empty directory alone does not prove the mount succeeded.
Keep two values in the dashboard. One points to the latest attempt, including a failed one. The other points to the last complete report for that configuration. The following example models the decision using synthetic data:
def keep_last_complete(previous, attempt, expected_roots, revision):
if not expected_roots or attempt["revision"] != revision:
return previous
completed = attempt["roots"]
if set(completed) != set(expected_roots):
return previous
if any(status != "complete" for status in completed.values()):
return previous
return attempt
roots = {"local", "nas"}
monday = {"revision": 4, "roots": dict.fromkeys(roots, "complete"), "pairs": 3}
tuesday = {"revision": 4, "roots": {"local": "complete", "nas": "unavailable"},
"pairs": 0}
wednesday = {"revision": 4, "roots": dict.fromkeys(roots, "complete"), "pairs": 0}
assert keep_last_complete(monday, tuesday, roots, 4) is monday
assert keep_last_complete(monday, wednesday, roots, 4) is wednesday
The worker should record a root as complete only after it has checked that the intended storage is available and finished its enumeration. In production, save the report and update the displayed pointer in the same database transaction. If runs can overlap, compare their sequence numbers when updating the pointer so a late older job cannot overwrite a newer complete result. Give a changed root set its own configuration revision.
In a disposable fixture, complete one run with known candidates. Then take a test source offline and rerun. The interface should show the failed source and retain the previous report with its original date. Finally, restore the source and run against a complete fixture with zero candidates. The interface should now show zero as a real result. Keep the review step for any action that would change a photo or album entry.
Immich's duplicate detection documentation gives a concrete example of visual candidates reviewed by a user. The run-state design above is for an independent indexer and does not describe Immich's implementation. AI assisted with drafting. The assertions use synthetic data.
]]>A code review bot can reply “LGTM, with two caveats” after sending a full project brief, tool schemas and a diff to the model several times. The reply is a poor proxy for the bill. The useful question is how often the repeated input was actually read from cache.
Imagine twelve calls to Claude Sonnet 5.5. Each call uses 18,000 tokens of shared prefix, 2,000 more input tokens and 1,000 output tokens. Under the example rates of $2 per million ordinary input tokens and $10 per million output tokens, twelve uncached calls cost $0.6000. The variable portion we want to change is the 216,000 repeated input tokens. The other input and the output together cost $0.1680 either way.
A five-minute cache write costs $2.50 per million tokens and a read costs $0.10 per million at those rates. One full prefix write and eleven full reads bring the trace to $0.2328. Twelve writes and no reads make it $0.7080. These figures are illustrative token charges, not a measured invoice, and exclude charges for tools and other services.
With this prefix length, each full cache read replacing a full write saves $0.0432. Two hits bring the all-write baseline to $0.6216. Three bring it to $0.5784, below the $0.6000 uncached baseline. That threshold applies only if every call either writes or reads the entire 18,000-token prefix. Use the actual counts when the prefix is partially cached, a miss falls back to ordinary input, or your pricing differs.
For a single task, capture the model, call number, elapsed time, and the four usage counters from each response. In the Claude API, ordinary input, cache creation, cache reads and output are reported separately. Multiply each category by its own rate. Keep the raw prompts out of the billing trace if they contain sensitive material.
When a call you expected to hit becomes a write, check the point where the prefix starts to differ. Did the agent add a timestamp ahead of the cache breakpoint? Did it reorder tools or use a different model? Did the prior entry expire? Put genuinely stable material before changing task context, then replay one permitted test fixture. Verify that the output is still acceptable and that the usage counters changed in the intended direction.
In a billing dashboard, use two adjacent rows rather than averaging the entire run. Check whether both rows have the same model, the same eligible prefix and the same cache duration. Record elapsed time separately from the cached token counters. A long gap and a changed prefix can both produce a write, but they point to different fixes. In a controlled test, change one factor at a time and keep the same acceptance test for the code review.
Here is a local check for the threshold in the example:
from decimal import Decimal as D
base, per_write, per_read = D("0.1680"), D("0.0450"), D("0.0018")
total = lambda hits: base + (12 - hits) * per_write + hits * per_read
assert total(0) == D("0.7080")
assert total(2) == D("0.6216")
assert total(3) == D("0.5784")
assert total(11) == D("0.2328")
assert min(h for h in range(12) if total(h) < D("0.6000")) == 3
For a repeated task, compare cost per accepted result. Include failed calls in the numerator instead of treating them as free. If an alternative API or an open-weight deployment passes the same acceptance checks, use the same denominator and include the costs that actually apply, such as setup or idle compute. Do not compare a single model call against an entire GPU job.
Prepared by CloudGPU with AI assistance. The sample token counts are hypothetical. The arithmetic assertions ran locally; no API call, latency measurement, or GPU comparison was performed.
]]>You can use AI without buying a discrete graphics card. But “complete a task with a ready-made model” and “deploy a specific model yourself” are different requirements. Write the task down clearly first, then compare a local small model on the computer you already have, on-demand cloud GPUs, and an existing model API, so you can see what you are actually missing.
This article was prepared with AI assistance, based on official public documentation. It is an English edition of the same brief as the Chinese original; the facts are unchanged. Chinese original: https://cloudgpu.hashnode.dev/ai-gpu-api
Fix one shared input, and write down what output you need and what counts as a pass. For example: turn a piece of public technical text that you are allowed to process into three key points. Work in three steps:
If the work is image or video, list the input, the output format, and the workflow you will use as a separate case. A text task that works does not prove that an image or video workflow will work.
A local small model on the computer you already have. This fits when you want the run to stay on the machine, and the task can start from a relatively small text model. Before you choose it, check the model license, the size of the weights, system memory, context length, and whether your current runtime can support it.
Parameter count is not the same thing as a minimum memory requirement. Weight format, quantization, context, and concurrency all affect resources. Being able to load a model, and whether the wait is acceptable, should also be judged separately. After a local run, record whether you actually used the CPU or an accelerator; do not infer the runtime from the fact that you did not buy a discrete GPU yourself.
On-demand cloud GPUs. This fits when you need to configure the model, dependencies, and a specific workflow yourself, and the equipment you already have cannot meet the resource requirements. Before you choose it, check the configuration you can actually get, software compatibility, how data will move in and out, and how compute and storage are billed. Renting the hardware does not automatically mean the workflow is already usable. When you finish, confirm separately whether compute has stopped, whether files have been retrieved, and whether storage or other resources are still being billed — follow the terms of the service you chose at that time.
An existing model API. This fits when the point is to obtain a given kind of model output, and you are willing to use the models and interfaces the provider offers. Before you choose it, check whether the model and modality support your task, input limits, rate limits, data-processing terms, how usage is metered, and the account balance. It is not the same as holding the model weights, and it does not mean you can deploy an arbitrary custom model. First confirm that the interface can accept your input and return the output you need, then decide whether it is a fit. Existing credits should not be read as permanently free.
Scale. Start with how large the model and the input are: whether the model type, weights, and context are enough, and whether the input exceeds limits. A small text task can be evaluated on equipment you already have; a specified image or video workflow needs its own resource check, not just the parameter name.
Latency. Compare the total time for the same task from submit to a usable result. For a local run, record load time and generation time; for a remote environment, also count setup and transfer; for an API, also count request waiting and retries. If you have no record for the same task, which path is faster is unknown.
Privacy. Whether the material can leave your environment decides which paths you can try directly. A local run still needs a check of whether the software phones home, how logs are stored, and file permissions. For a cloud environment or an API, first check the scope of uploads, retention rules, and access. If the material should not go out, do not trial it on real data; use public text you are allowed to process to validate the flow first.
Total cost. Local runs should count equipment, power, and maintenance; cloud GPUs should count the billed items that actually apply, such as compute, storage, and transfer; APIs should be counted in the units the specific model uses. Failures, retries, and human review should also be included in the cost of each accepted result. Without bills and a count of accepted results, do not fill in a savings percentage, and do not treat numbers from a historical page as a current promise.
Pick one concrete task, and work in this order:
Get one result you can check, then decide whether you need more hardware.
References:
]]>不买独立显卡,也有使用 AI 的路径。但“用现成模型完成任务”和“自己部署指定模型”是不同的要求。先把任务写清楚,再比较手头电脑上的本地小模型、按需云 GPU 和已有模型 API,才能知道自己到底缺什么。
本文由 AI 辅助整理,依据官方公开文档编写。
先固定同一份输入,写清要得到什么输出、怎样才算合格。例如:把一段允许处理的公开技术说明整理成三条要点。操作时分三步:
如果你要做的是图像或视频,就把输入、输出格式和所用工作流另列出来。文本任务能走通,不能证明图像或视频工作流也能走通。
手头电脑上的本地小模型。 适合希望把运行过程留在本机、任务可以从较小的文本模型起步的情况。选择前要核:模型许可、权重体积、系统内存、上下文长度,以及当前运行环境是否支持。
参数规模不能直接当成最低内存要求;权重格式、量化、上下文和并发都会影响资源。能加载模型,和等待时间是否可接受,也要分开看。本机运行后,应记下当时实际是用处理器还是加速卡,不能凭“没有自购独立显卡”直接推断运行方式。
按需云 GPU。 适合需要自己配置模型、依赖和特定工作流,而现有设备又达不到资源要求的情况。选择前要核:实际可用配置、软件兼容、数据怎么进出,以及计算和存储怎么计费。租到硬件,并不自动等于工作流已经可用。结束时,分别确认计算是否停止、文件是否取回、存储等资源是否仍在计费,具体以所选服务当时的条款为准。
已有模型 API。 适合重点是取得指定类型的模型输出,并愿意使用服务方提供的模型和接口。选择前要核:模型与模态是否支持你的任务、输入限制、速率、数据处理条款、计量方式和账户余额。它不等于持有模型权重,也不意味着可以部署任意自定义模型。先确认接口能处理你的输入并返回需要的输出,再决定是否适合。已有额度也不应被理解成永久免费。
体量。 先看模型和输入有多大:模型类型、权重和上下文够不够,输入是否超限。小文本任务可以先评估已有设备;指定的图像或视频工作流要单独核资源,不能只看参数名称。
延迟。 比较同一任务从提交到拿到可用结果的总时间。本地记下加载和生成时间;远程环境还要算准备和传输;接口还要算请求等待和重试。没有同一任务的记录时,谁更快就是未知。
隐私。 资料能不能外传,决定了哪些路径能直接试。本地运行也要核软件是否联网、日志怎么保存、文件权限如何。云环境和接口则要先核上传范围、保留规则和访问权限。资料不适合外传时,不要直接用真实资料试跑,可以先用允许处理的公开文本验证流程。
总成本。 本地要算设备、电力和维护;云 GPU 要算计算、存储和传输等实际计费项目;接口要看具体模型按什么单位计量。失败、重试和人工校对也应记入每个合格结果的成本。没有账单和合格结果数量时,不要填写节省比例,也不要用历史页面上的数字当作现行承诺。
先选一项具体任务,按以下顺序做:
先拿到一份能核对的结果,再决定是否需要增加硬件。
参考资料:
]]>A ComfyUI graph that saves one image can still miss the deadline when you ask it for a batch. Before you shortlist hardware, pick one job your team actually delivers and write down what a passing run looks like. Here’s an example you can build into a runbook or hand to an agent.
Suppose an online shop needs background PNGs for a product catalogue. The image should have an empty central area for the product, soft light from the upper left and clean edges around the pedestal. Check every PNG for the requested dimensions, readability, stray objects, text and watermarks. The graph generates the background plate. The product photo and the compositing step stay in your usual editing workflow.
Build a text-to-image graph with Load Checkpoint, positive and negative CLIP Text Encode, Empty Latent Image, KSampler, VAE Decode and Save Image. Use the official example for the wiring. For this example, select SDXL Base 1.0 explicitly and record the actual checkpoint hash and VAE choice. Write down the ComfyUI, frontend, Python, PyTorch, CUDA and driver versions, along with precision, concurrency and offload settings. ComfyUI example · SDXL weights and license
| Case | Canvas | Batch | Expected output |
|---|---|---|---|
| A, daily | 1024 × 1024 | 1 | One usable background PNG |
| B, heavier | 1024 × 1024 | 4 | Four usable background PNGs |
Try this positive prompt: “Empty matte ivory pedestal on a warm beige seamless studio backdrop, soft light from the upper left, clear central space for product compositing.” For the negative prompt, try “product, people, text, logo, watermark, clutter.” Use both prompts in both cases. The example settings are seed 42117 fixed, Euler sampler, normal scheduler, 20 steps, CFG 7 and denoise 1. If your largest real order differs, replace B before the comparison and keep it fixed across devices. A fixed seed controls one input. Judge the images against the same delivery criteria across devices.
These are example inputs for an unrun protocol. Start with an empty worksheet and record your own results.
| GPU / total VRAM | Driver / framework | Case / workflow and settings | Sampled device peak | PyTorch allocated / reserved peaks | First / repeat time | Budget cap / actual spend | Export location / second-machine check |
|---|---|---|---|---|---|---|---|
For an agent-run job, define success as the expected count of usable PNGs, a verified export and an accompanying log. Stop on a budget breach, an unresolved missing dependency or an out-of-memory failure. Record the last completed step so a person can decide what to change.
Once both cases pass, compare the runs against your delivery deadline and how often you expect to run them. Include power, cooling and software compatibility for a local build. If you’re considering a rental for one comparison run, I work on CloudGPU and our ComfyUI GPU selection guide covers the configuration and billing checks to make before choosing one.
]]>I work on CloudGPU. Many teams automate the easy part: a job retrains on a schedule, writes new weights, and stops. The part that actually changes what users see is promotion: deciding whether those new weights replace the current ones. If that step is missing, every finished job is treated as a go-ahead.
The new run should earn its place by beating the current weights on the same frozen evaluation set. If the set changed, the two scores are not comparable, and the gate should say so instead of guessing. Write down the set name, the metric, and the seed next to both the current weights and the candidate.
Measure how much the metric moves when you retrain the same setup with different seeds, and put the promotion threshold above that noise. A tiny gain on a set that also changed is not evidence.
Agree, in advance, what "good enough to ship" means: the metric, the minimum gain, and what happens if the gate fails (keep the current weights; do not silently swap). Put that note with the training configuration, off the machine that will run the job.
If you promote, you also need a way to return to the previous weights. Do that once on purpose, on a small run, and record the steps: which files, which configuration, which command. A rollback that has never been tried is only a hope.
A completed training job means training finished. Promotion is a separate decision, made against a frozen evaluation set, with a written rule for failure and a rollback you have already rehearsed.
More notes on running and collecting GPU jobs: https://cloudgpu.app/docs/agents?utm_source=hashnode&utm_medium=article&utm_campaign=202611_seg08_finetune_gpu&utm_content=hn1116_promote
]]>I work on CloudGPU. Compare the relative-path-to-file-reference mappings first. That gives you added paths, removed paths and paths now pointing to a different saved file. It is a project-version comparison, not a comparison of installed environments or a proof that two files have different bytes.
CloudGPU documents immutable Workspace versions. Read the two selected versions using your existing account access or GET /v1/workspace-versions/{id}. Normalize each result into just its relative-path-to-file_id mapping and save the mappings as old.json and new.json. The HTTP response envelope is not assumed to be the mapping itself.
Do not save authorization headers or temporary download URLs in these files. This comparison requires neither downloading the referenced file contents nor creating a Job. Reading your account still depends on its current storage eligibility and key scope.
Save as diff_versions.py:
import json
import re
from pathlib import Path
def read_manifest(path):
data = json.loads(Path(path).read_text())
if not isinstance(data, dict) or not data:
raise ValueError("Expected a nonempty path-to-file mapping")
for name, file_id in data.items():
if not isinstance(name, str) or not name:
raise ValueError("Expected a project path")
if not isinstance(file_id, str) or not re.fullmatch(
r"file_[0-9a-f]{32}", file_id
):
raise ValueError(f"Expected a file reference at {name}")
return data
def compare(old, new):
return {
"added": sorted(new.keys() - old.keys()),
"removed": sorted(old.keys() - new.keys()),
"replaced": sorted(
name for name in old.keys() & new.keys()
if old[name] != new[name]
),
}
if __name__ == "__main__":
result = compare(read_manifest("old.json"), read_manifest("new.json"))
print(json.dumps(result, indent=2))
python3 diff_versions.py
This is a comparison helper, not a full manifest validator. It does not create or mutate versions. Review a renamed file as an addition and a removal: the script deliberately does not guess a rename from unrelated metadata.
Workspace is not a whole-machine snapshot. It restores project files, not the operating system, drivers or installed dependencies. Rebuild dependencies separately. Storage has account eligibility, quotas, retention rules and separate charges; a GPU budget does not include storage fees. This recipe makes no claim about unlimited capacity or perpetual retention.
The CloudGPU integration and Workspace guide describes the file-version boundary and links the current OpenAPI contract. The file-reference pattern in the helper follows the version-creation schema; it does not assume a particular read-response envelope. Python's JSON documentation covers the local serialization.
Related CloudGPU video: How to Make an AI Short Drama Without Wasting GPU Minutes. A revised shot project is a useful reason to review file changes; this is contextual viewing, not a demonstration of this version-diff program.
https://www.youtube.com/watch?v=EOc5rh8MfVk
The local code was syntax-checked and exercised with synthetic manifests. No account files were read, restored or uploaded, and no GPU was rented for this answer.
]]>I work on CloudGPU. Check for two retry owners: the SDK and your application. A single call in your code can become several HTTP attempts if both layers retry. In the OpenAI Python SDK, max_retries=0 disables its automatic retries so an application can make that policy explicit.
Search the call path for an outer retry decorator, queue redelivery and SDK configuration. The official SDK documentation describes two automatic retries by default for eligible errors. That is a client-library behavior, not evidence that a model endpoint offers an idempotency contract.
Do not infer an HTTP attempt count from the number of calls you can see at the application level. Record a local operation ID and an attempt counter without recording credentials or prompt contents.
Set ${CLOUDGPU_API_KEY} and ${CLOUDGPU_BASE_URL} in your process environment using your normal secret-handling method. The base value must be the current API base from the CloudGPU documentation, including its version prefix. Do not append that prefix twice, put a secret into source code, or commit a session environment.
This example deliberately has no outer retry loop:
import os
from openai import OpenAI, APIConnectionError, APIStatusError
def request_once():
with OpenAI(
api_key=os.environ["CLOUDGPU_API_KEY"],
base_url=os.environ["CLOUDGPU_BASE_URL"],
max_retries=0,
) as client:
try:
result = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Name one Python collection."}],
)
except APIStatusError as failure:
print({"http_status": failure.status_code})
raise SystemExit(1) from None
except APIConnectionError:
print({"state": "no confirmed response"})
raise SystemExit(1) from None
if not result.choices:
raise SystemExit("Response has no choices")
print(result.choices[0].message.content)
if __name__ == "__main__":
request_once()
This is a live-call recipe for a separately approved request, not a test performed during preparation. It does not disable retries in a reverse proxy or another process. Record the installed SDK version with python3 -m pip show openai when diagnosing a real integration.
If the application owns retries, define a bounded attempt count, cancellation behavior and which response categories are eligible. A timeout leaves the remote outcome uncertain. Do not borrow the GPU Jobs idempotency contract for a chat request merely because both APIs accept HTTP traffic. For a rejected configuration or invalid key, correct the underlying cause rather than repeating the same request.
Official references: SDK retry configuration and CloudGPU API contract and error codes. The model identifier above was present in today's public model catalog; recheck the catalog before a later live call.
Related CloudGPU video: This Video Was Made by AI. Now Run AI Yourself. It introduces the compute context; it does not demonstrate this SDK failure path.
https://www.youtube.com/watch?v=lS1mz_gTIV4
Only local syntax checks were performed. No model request or retry experiment was sent, and no service result is claimed.
]]>I work on CloudGPU. Compare the workflow's API-format class_type values with the node inventory of the ComfyUI server you intend to use. This distinguishes a node-registration problem from a generation failure before submitting anything to the queue.
In the frontend, use File → Export Workflow (API). A normal editor save includes layout information and is not the same data structure. Keep your original editor save separately.
From your own existing ComfyUI server, open its documented GET /object_info route through your existing access method and save the JSON response as object_info.json. Do not expose a service publicly just to obtain the inventory. Use the inventory from the intended server, not a different installation.
Save the exported graph as workflow_api.json and this script as check_nodes.py:
import json
from pathlib import Path
def missing_types(graph, inventory):
if not isinstance(graph, dict) or not graph:
raise ValueError("Expected a nonempty API-format workflow")
if not isinstance(inventory, dict):
raise ValueError("Expected an object_info mapping")
missing = {}
for node_id, node in graph.items():
if not isinstance(node, dict):
raise ValueError(f"Invalid node: {node_id}")
kind = node.get("class_type")
if not isinstance(kind, str) or not kind:
raise ValueError(f"No class_type at node {node_id}")
if not isinstance(node.get("inputs"), dict):
raise ValueError(f"No inputs mapping at node {node_id}")
if kind not in inventory:
missing[str(node_id)] = kind
return missing
if __name__ == "__main__":
graph = json.loads(Path("workflow_api.json").read_text())
inventory = json.loads(Path("object_info.json").read_text())
missing = missing_types(graph, inventory)
print(json.dumps(missing, indent=2))
raise SystemExit(1 if missing else 0)
python3 check_nodes.py
A missing type can mean a package is absent, a node import failed, or the workflow expects a different node revision. Read that server's import logs and compare the workflow author's stated dependencies before changing anything. The checker deliberately does not install packages or execute a graph.
Matching names do not establish compatible input values, connected outputs or model files. Check those separately before an authorized run. Re-export after an intentional graph edit instead of replacing unfamiliar node names in JSON by guesswork.
Official references: API-format export and server routes, including object_info. For the compute-side context, see the CloudGPU integration guide.
Related CloudGPU video: How to Make an AI Short Drama Without Wasting GPU Minutes. A short-drama workflow is a practical reason to inspect a graph before scheduling its renders; the video is context, not a test of this checker.
https://www.youtube.com/watch?v=EOc5rh8MfVk
This is an offline preflight recipe with a syntax-checked script. No generation or rented-GPU test was performed for this answer.
]]>I work on CloudGPU. A failed AI video trial can leave two very different things behind: a usable explanation, or another file that nobody can interpret. The difference is usually decided before the next attempt starts. Write down what the retry should establish, then preserve enough context to assess it.
Begin with a representative shot. Pick one that exercises the real workflow rather than an unrelated sample. State the defect in observable terms: the character leaves the frame, the motion contradicts the brief, or the output does not decode. These are different failure classes. Increasing compute cannot fix an input file that the workflow cannot load.
Separate technical validation from creative acceptance. The technical check asks whether the expected files exist, open correctly and contain the intended dimensions or frame count. The creative check asks whether the shot satisfies the visual brief. A trial can pass one and fail the other. Keep those decisions separate in the run record so the next person knows whether to investigate the pipeline or the shot design.
Choose one main variable for the next comparison. If the accepted reference already establishes the character, preserve it while testing motion settings. If the input composition is the problem, hold the later stages as steady as possible while comparing a revised reference. Some workflows have coupled settings, so record any unavoidable secondary changes rather than presenting the trial as a perfectly isolated experiment.
Give every attempt a run identifier. Store the workflow revision, input versions, model revision, seed, output settings, environment and output name beside it. Do not put credentials or private download links into that record. A seed helps organize a comparison; it does not establish identical behavior across different hardware and software environments. Preserve the actual files that support the decision.
Write the acceptance criterion before computing. A criterion such as “the character stays inside the frame throughout the shot” is more useful than an explanation invented after watching the result. The team may still revise its creative direction, but that revision should be visible. Otherwise, repeated trials can appear to improve while the target quietly changes.
For a remote trial, add a resource proposal. Inspect the current capability catalog and check the selected workflow's requirements. Show estimated total cost, required starting balance, quote expiry, permitted inputs, result destination, and hard spending and time ceilings before asking for approval. Approval of one trial does not authorize an unlimited search through variations. Connecting an account is a separate event.
Plan the result path before the task runs. A batch environment that removes local files on termination needs an export step before the command exits. If a secure export path is unavailable, choose an interactive workflow that allows download and verification before destruction. Store the workflow metadata with the originals so the review can connect each output to the settings that produced it.
Finally, review whether the trial answered its question. A rejected output can still be valuable if it rules out an explanation and suggests a specific next change. Record the reason and the proposed next action, then decide whether another trial is justified. Scaling should follow evidence from a small comparison, not replace the comparison.
]]>I work on CloudGPU.
A rendering session can produce many files without resolving the problem that started it. If the original question was whether a reference image improves a character's continuity, a folder of unrelated variations does not answer it. A useful stopping rule starts with the question rather than a target number of generations.
Choose one property that a reviewer can assess. “Improve the scene” is broad. “Keep the character's gaze directed toward the exit across the cut” gives the reviewer something specific to examine. Record the scene and shot identifiers, and identify the existing take that shows the problem.
Separate observation from intervention. The observation might be that the background changes when the character turns. Replacing the reference image is one proposed intervention. Keeping both entries lets the team test another intervention without forgetting the original failure.
Record the model and workflow revisions, input identifiers, output dimensions and random seed. Then identify the condition being changed. A seed alone does not capture the runtime environment, and it is not a promise of identical outputs across environments.
Decide what would count as enough information. A reviewer might accept the new take, reject it for a specific continuity error, or decide that the comparison is inconclusive. All three outcomes can end the current experiment. Inconclusive does not automatically justify more remote computation.
First check that the expected files arrived and can be opened. Compare the output list with filenames, byte counts and checksums. A matching checksum establishes transfer consistency; it does not establish that a face, gesture or transition is correct.
Then perform the visual review against the original question. Avoid promoting a take merely because it looks better in an unrelated part of the frame. Record the selected version and the remaining failure. Preserve rejected outputs when doing so is appropriate for the project's data rules.
Try the review procedure with existing files first. If another remote run is justified, define its inputs, selected workflow and stopping condition before creating resources. Compare the task requirements with the current compute catalog rather than assuming that model name alone determines memory requirements.
For an agent-assisted CloudGPU workflow, the task proposal should show the selected configuration, estimated total cost, required starting balance, quote expiry and hard spend and time caps. The user approves that specific task. Account connection is a separate decision. If the proposed intervention changes the task materially, bring the revised plan back for review.
Decide how results reach the owner before execution. CloudGPU's documented Jobs flow requires export before the command terminates. If there is no verified export route, an instance workflow lets the owner download and validate the outputs before destruction.
The final record should answer the original question, identify the reviewed files and distinguish a completed comparison from a partial or uncertain outcome. Do not use a successful process exit to stand in for a review that never happened.
A practical first exercise is to take two existing clips and ask a colleague to find the exact issue and chosen version using only the review record. If they cannot, improve the record before generating another take. That exercise measures whether the next experiment will be interpretable, without requiring a new render.
]]>I work on CloudGPU. A short drama can involve several decisions: which shot to keep, which input produced it, and which settings should carry into the next attempt. I suggest writing the handoff plan before starting the render sequence.
Choose a shot that represents the scene you want to make. Record its input assets, workflow configuration and acceptance criteria. Review the result before expanding the sequence. A rejected test can still be useful if the review records what needs to change.
Give each selected output an identifiable place in the project. Keep its configuration and the inputs needed to repeat the attempt nearby. Record which version the editor should use. This avoids forcing the editor to infer decisions from a folder of similar files.
Export the selected output and the material required for the next stage. Open the copies in the receiving environment. Check that the expected files are readable and that the editor can identify the chosen version. Leave the handoff open when those checks are incomplete.
The supplied CloudGPU skill review describes a termination boundary that requires results to be exported before the environment ends. That makes the receiving-copy check a useful project milestone. Only close the handoff after the copies have been checked.
This is a proposed production method. It reports no rendered benchmark, model capability or measured saving. For a first experiment, ask an editor to receive one shot package and record every missing item before expanding the workflow.
]]>Adapted from our CloudGPU guide on using DeepSeek V4 Flash in Roo Code.
Short answer: create one Roo Code configuration profile per model, all using the OpenAI Compatible provider with the same Base URL (https://cloudgpu.app/v1) and API key, and change only the Model field: deepseek-v4.1-flash, kimi-k2.6, kimi-k3 or minimax-m3. Then link a profile to each Roo Code mode, and run one tool-call request per model ID before you trust it with a task.
Disclosure: I work on CloudGPU, and the endpoint below is ours. The Roo Code steps follow the official Roo Code docs (API Configuration Profiles and Using OpenAI Compatible Providers). We haven't run Roo Code end to end against this endpoint, so the checks below are for you to run, not results we measured.
According to the Roo Code docs, a configuration profile holds its own provider, API key, model selection, temperature, thinking budget and rate limit setting, and you can switch profiles from Settings or from the API Configuration dropdown in the chat. The docs also say you can link a profile to each mode, and that each task remembers the profile it started with, so a resumed task keeps its original model.
That fits a gateway well: the provider, URL and key never change, so each profile differs only in its model ID.
cgw-sk-...) from the API console. It is shown once, so copy it right away. The quick start is on the API docs page.export CLOUDGPU_API_KEY="cgw-sk-your-key"
These chat model IDs are in the model table on the CloudGPU API page (checked 2026-10-28). IDs are case-sensitive.
| Model ID | Model |
|---|---|
deepseek-v4.1-flash |
DeepSeek V4.1 Flash |
kimi-k2.6 |
Kimi K2.6 |
kimi-k3 |
Kimi K3 |
minimax-m3 |
MiniMax M3 |
GET /v1/models is public: it lists model IDs without a key. Other endpoints still need your key.
curl -s https://cloudgpu.app/v1/models
Following the Roo Code docs: open Settings (gear icon), go to Providers, click + next to the profile selector and name the profile, for example cgw-deepseek. Then fill in:
| Roo Code field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://cloudgpu.app/v1 |
| API Key | your cgw-sk-... key |
| Model | deepseek-v4.1-flash |
Repeat for cgw-kimi-k2.6, cgw-kimi-k3 and cgw-minimax, changing only the Model field.
The docs list a per-profile Rate Limit (minimum seconds between requests, default 0, meaning off). Leave it at 0 unless you hit 429 rate_limit_exceeded; the API docs list 100 requests per minute per key and 10,000 requests per day per account. Every profile here uses the same key, so they share the per-key limit.
Model Configuration (Max Output Tokens, Context Window and so on) is optional. We don't publish values for these models, so leave the defaults unless you know the limits you need.
The Roo Code docs say you can associate a profile with each mode in the Prompts tab, and Roo Code also remembers the last profile you used in each mode. Which model goes with which mode is your call; one way to try it is a Kimi profile for Architect and a DeepSeek profile for Code, then swap and compare on the same small task.
Orchestrator subtasks inherit the parent task's profile, according to the docs, so a subtask won't switch models on you mid-task.
The Roo Code docs say it "uses native tool calling exclusively" and that a model without native tool calling "cannot be used with Roo Code". We haven't confirmed tool calls for any of these four IDs inside Roo Code, so the way to verify is to run one request with a tools array for each model ID. This uses the openai Python package (pip install openai):
import os
from openai import OpenAI
client = OpenAI(
base_url="https://cloudgpu.app/v1",
api_key=os.environ["CLOUDGPU_API_KEY"],
)
tools = [{
"type": "function",
"function": {
"name": "read_file",
"description": "Read a file from the workspace",
"parameters": {
"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"],
},
},
}]
for model in ["deepseek-v4.1-flash", "kimi-k2.6", "kimi-k3", "minimax-m3"]:
try:
resp = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Open README.md using the tool."}],
tools=tools,
max_tokens=2048, # leave room: some models think before they answer
)
except Exception as e:
print(f"{model}: error -> {e}")
continue
msg = resp.choices[0].message
if msg.tool_calls:
call = msg.tool_calls[0].function
print(f"{model}: tool call -> {call.name}({call.arguments})")
else:
print(f"{model}: no tool call, text -> {msg.content!r}")
How to read it:
tool_calls present (a read_file call with {"path": "README.md"} or similar): try that profile in Roo Code on a small task.content and no tool call: some models spend output tokens on thinking first. Raise max_tokens here (and Max Output Tokens in that profile's Model Configuration) and run it again before you decide.invalid_api_key: the key is wrong or revoked. Create a new one in the console and update it in every profile.missing_authorization: no Authorization: Bearer header was sent (/v1/models is public, but chat requests need the key). In a shell, check that echo $CLOUDGPU_API_KEY isn't empty.model_not_found: check the Model field against /v1/models; IDs are case-sensitive.https://cloudgpu.app/v1.rate_limit_exceeded: all profiles share the same key's limit; set a small per-profile Rate Limit or slow down parallel tasks.Can Roo Code use several models through one OpenAI-compatible endpoint? Yes. Create one configuration profile per model ID with the same Base URL and API key, and switch profiles from Settings or the chat dropdown.
Can each Roo Code mode use a different model? Yes. The Roo Code docs say you can link a configuration profile to each mode in the Prompts tab.
Do deepseek-v4.1-flash, the Kimi IDs and minimax-m3 support the tool calling Roo Code needs? We haven't confirmed tool calls on any of them inside Roo Code. Run the Step 4 Python check for each ID before you rely on it.
Do all profiles share one rate limit? They share the limits of the key they use: 100 requests per minute per key and 10,000 requests per day per account, per the API docs.
Where are the rates? Per-model rates are in the price table on the CloudGPU API page.
Facts checked 2026-10-28.
]]>If you try Wan 2.2 T2V A14B at 1280×720 on a 24 GB card and get torch.OutOfMemoryError, you are not alone. A public bug report, reported in InvokeAI issue #9831 (2026-10-12) on an RTX 4090 24GB, lays out exactly when it fails, why, and which setting got it running. This post walks through that report and the official docs, step by step.
Everything below is quoted from the issue or from official documentation. We have not reproduced the runs ourselves.
From InvokeAI issue #9831 (opened 2026-10-12, open, labelled bug, no comments when read on 2026-10-28):
main at 8111b5067e (7.0.0-alpha.1), Python 3.12, torch 2.13.0+cu130.Wan2.2-T2V-A14B-Diffusers components and the Lightning 4-step LoRAs (V1.1, high and low).invokeai.yaml.torch.OutOfMemoryError in diffusers/models/transformers/transformer_wan.py:502.The issue's results table (settings and outcome as reported; we list the memory outcome only):
enable_partial_loading |
device_working_mem_gb |
Attention | Memory outcome reported in #9831 |
|---|---|---|---|
| true (default) | 3 (default) | PyTorch SDPA | OOM in the first transformer block, also at 832×480 |
| false | 3 | PyTorch SDPA | Completed, but VRAM full; overflowed into shared system memory |
| true | 10 | PyTorch SDPA | Completed (the issue's workaround for 24 GB) |
| true | 10 | SageAttention | Completed, but overflowed (about 1.2 GB more held than SDPA) |
| false | 3 | SageAttention | Completed, but overflowed into shared system memory |
Two details matter when you compare this with your own machine:
What to check
torch.OutOfMemoryError in the Wan transformer, at the first denoise block.invokeai.yaml still has the defaults (enable_partial_loading: true, device_working_mem_gb: 3, or neither line set).Two experts, one at a time. The official Wan2.2 README (read 2026-10-28) describes the A14B models as a two-expert design: "a high-noise expert for the early stages, focusing on overall layout; and a low-noise expert for the later stages, refining video details. Each expert model has about 14B parameters, resulting in a total of 27B parameters but only 14B active parameters per step". So you download and load two diffusion models, but each denoise step uses one.
The official script's own guidance. For its single-GPU 1280*720 A14B command (with --offload_model True --convert_model_dtype), the README says: "This command can run on a GPU with at least 80GB VRAM." That statement is about the Wan repo's generate.py, not about InvokeAI or GGUF weights, but it tells you 720p A14B is not a small job.
What the issue found inside InvokeAI. According to #9831:
_get_wan_transformer_working_mem_bytes returns None unless wan_memory_optimization is on, so the expert is loaded with the floor, device_working_mem_gb (3 GB), as its working memory.In short: model weights plus text encoder plus the attention activations for 75,600 tokens do not fit in 24 GB, and InvokeAI reserves only 3 GB for the activations by default.
What to check
InvokeAI's Low-VRAM mode docs (read 2026-10-28): "Invoke reserves 3GB VRAM as working memory by default", and you can raise it in invokeai.yaml to prevent OOMs (the docs' example sets 4).
The issue's workaround for this exact case on 24 GB is 10:
# invokeai.yaml — workaround reported in InvokeAI issue #9831 for 24 GB
device_working_mem_gb: 10
With that, partial loading on and SDPA, the issue reports the 720p, 81-frame job completing. Invoke needs a restart after you edit the file.
What to check
max_cache_vram_gb, the docs say to keep it at or below your VRAM minus device_working_mem_gb minus reserve_vram_gb.The docs say Low-VRAM mode is enabled by default via enable_partial_loading: true. In the issue, turning it off did not prevent the overflow: the encoder was unloaded, but the run spilled into shared memory.
The same docs ask Windows users to disable the Nvidia sysmem fallback: NVIDIA Control Panel → 3D Settings → Manage 3D Settings → "CUDA - Sysmem Fallback Policy" → "Prefer No Sysmem Fallback". With it disabled, an overflow shows up as an OOM you can act on instead of silently spilling into shared system memory.
What to check
enable_partial_loading is true (or absent) in invokeai.yaml.wan_memory_optimization (opt-in)From the same docs page: setting wan_memory_optimization: true makes partial-load Wan transformer weights "target about 2 GiB resident and stream remaining layers from RAM". It "reduces peak VRAM during both denoise and decode, but generation can be substantially slower and requires enough system RAM for offloaded weights." The docs also note same-seed output may differ slightly from the baseline path.
The issue explains that this flag is also what turns on Wan's working-memory estimate. It does not report a run with the flag on, so we have no figures for it.
wan_memory_optimization: true
What to check
The issue's only other resolution is 832×480. With default settings it also ran out of memory. With partial loading on and device_working_mem_gb: 10, it fit with both attention backends.
The issue tests 81 frames only. Fewer frames means a shorter clip, but the issue gives no figures for it, so try it on your own setup rather than relying on a number from us.
What to check
device_working_mem_gb as well; do not rely on resolution alone.The issue already used GGUF Q4_K_M weights for both experts and still ran out of memory at default settings. Lower-bit weights alone did not fix it there; working memory did.
If you use the Wan repo's own generate.py instead of InvokeAI, the README says: "If you encounter OOM (Out-of-Memory) issues, you can use the --offload_model True, --convert_model_dtype and --t5_cpu options to reduce GPU memory usage."
On attention, these are figures reported in InvokeAI issue #9831 (one RTX 4090 24GB on Windows), not measured by us and not a claim about CloudGPU cards: the issue reports SageAttention held about 1.2 GB more than SDPA at 75,600 tokens, which pushed that card over the edge at 720p. At 832×480, the issue reports both backends fit.
What to check
If the slower settings are not an option for you, the other route is more VRAM. On CloudGPU you can rent a card with more VRAM, billed per minute, and set up the same InvokeAI workflow on it. Cards listed on /pricing when we read it on 2026-10-28 include:
| Card on /pricing | VRAM (as shown on /pricing) |
|---|---|
| RTX 5090 32G | 32 GB |
| RTX 4090 48G | 48 GB |
| A100 80G | 80 GB |
To be clear about what this does and does not mean:
What to check
Why does Wan 2.2 A14B run out of memory at 720p on a 24 GB GPU in InvokeAI? According to InvokeAI issue #9831, Wan denoise has no working-memory estimate unless wan_memory_optimization is on, so InvokeAI reserves only the default 3 GB for activations. At 1280×720 with 81 frames the transformer sees 75,600 tokens, and the activations need far more than that.
What setting fixed it in the issue?device_working_mem_gb: 10 in invokeai.yaml, with partial loading left on. The issue reports the 720p, 81-frame job then completed on an RTX 4090 24GB (Windows 10, InvokeAI 7.0.0-alpha.1).
Does turning off partial loading help? Not in the issue. With enable_partial_loading: false the card still overflowed, and Windows moved memory to shared system memory instead of raising an OOM.
Does lowering the resolution to 832×480 avoid the OOM? Not on its own. The issue reports an OOM at 832×480 with default settings too; with device_working_mem_gb: 10 it fit.
What does the official Wan2.2 README say about VRAM for A14B at 720p? For its own single-GPU generate.py command at 1280*720, it says the command "can run on a GPU with at least 80GB VRAM", and suggests --offload_model True, --convert_model_dtype and --t5_cpu for OOM issues.
Adapted from our CloudGPU blog post on Kimi K2.
If a tool already speaks the OpenAI-compatible chat format, switching it to Kimi comes down to three values: the base URL, the API key and the model ID. This post shows those values on the CloudGPU gateway, then the same setup in curl, the openai Python package, Cline and Aider.
Disclosure: I work on CloudGPU.
| Setting | Value |
|---|---|
| Base URL | https://cloudgpu.app/v1 |
| API key | a cgw-sk-... key from the API console, kept in $CGW_API_KEY |
| Model ID | kimi-k2.6 or kimi-k3 |
Both IDs are in the model table on the live API page (checked 2026-10-27), which also lists kimi-k2.5. The original post suggests kimi-k2.6 for everyday coding agents and kimi-k3 for harder reasoning tasks.
A team test on 2026-10-26 with an internal key found both IDs in /v1/models, a working chat request, and a single tool call (the tools parameter, returning tool_calls) for each.
cgw-sk- and is shown only once, so copy it straight away.export CGW_API_KEY="cgw-sk-..."
The same balance pays for the API per token and for rented GPUs by the minute.
curl https://cloudgpu.app/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CGW_API_KEY" \
-d '{
"model": "kimi-k2.6",
"messages": [{"role": "user", "content": "Refactor this function to use early returns."}]
}'
If something is off, the error codes from the API docs tell you what:
401 missing_authorization: no Authorization header was sent.401 invalid_api_key: the key is unknown or revoked.400 model_not_found: the model ID is not in the catalog. Copy it from the model table.429 rate_limit_exceeded: you hit the per-minute or per-day limit. The public beta defaults are 100 requests per minute per key and 10,000 requests per day per account.Only base_url and api_key change:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://cloudgpu.app/v1",
api_key=os.environ["CGW_API_KEY"],
)
resp = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Explain this stack trace in two sentences."}],
max_tokens=2048,
)
print(resp.choices[0].message.content)
For streaming, pass stream=True. The API docs say the response is Server-Sent Events in OpenAI format and the SDK handles it for you.
If a reply comes back empty with finish_reason set to "length", the model ran out of output budget. Raise max_tokens and try again.
According to the official Cline docs ("OpenAI Compatible" provider page, read 2026-10-27), the settings are in the Cline settings panel (the gear icon):
https://cloudgpu.app/v1cgw-sk-... key.kimi-k2.6 (or kimi-k3).The same docs list the usual fixes: "Invalid API Key" means the key or provider is wrong, and "Model Not Found" means the model ID isn't available at that base URL.
According to the official Aider docs ("OpenAI compatible APIs", read 2026-10-27), set two environment variables and prefix the model name with openai/:
export OPENAI_API_BASE=https://cloudgpu.app/v1
export OPENAI_API_KEY=$CGW_API_KEY
aider --model openai/kimi-k2.6
On Windows the docs use setx OPENAI_API_BASE ... and setx OPENAI_API_KEY ..., then restart the shell.
It speaks the OpenAI chat-completions format, streams tokens, and bills per token from a prepaid balance with no subscription. It doesn't store your prompts or train on them, and there is no automatic failover. Per-token rates for every model are listed on the API page and can change, so this post doesn't repeat them.
Model IDs, rates and the full docs: cloudgpu.app/api
Which base URL do I use?https://cloudgpu.app/v1 for any OpenAI-compatible client.
Which model ID should I start with? The original post suggests kimi-k2.6 for everyday coding agents and kimi-k3 for harder reasoning. Both are in the live model table.
Does it work with the OpenAI SDK? Yes. Set base_url to https://cloudgpu.app/v1 and pass your cgw-sk- key as api_key.
How do I pay? From a prepaid balance, topped up by card or USDT.
]]>Adapted from our opencode custom-provider tutorial on dev.to.
You add a provider block to opencode.json that uses the @ai-sdk/openai-compatible package, set its baseURL to https://cloudgpu.app/v1, read the key from {env:CGW_API_KEY}, and list deepseek-v4.1-flash and kimi-k3 under models; opencode then offers them as cloudgpu/deepseek-v4.1-flash and cloudgpu/kimi-k3.
The rest of this post is the copy-paste version of that sentence, with each opencode behaviour traced to the opencode docs.
Disclosure: I work on CloudGPU.
We ran this provider block in opencode on 2026-10-26 and both headline models replied. Everything else below about opencode itself (the /models screen, /connect, the limit block, the default model) follows the opencode docs, so read "according to the opencode docs" literally.
| What | Value |
|---|---|
| npm package | @ai-sdk/openai-compatible |
| Base URL | https://cloudgpu.app/v1 (keep the /v1) |
| API key | a cgw-sk-... key, exported as CGW_API_KEY |
| Model IDs | deepseek-v4.1-flash, kimi-k3, kimi-k2.6, glm-5.3-flash |
The model IDs were checked against the model table on the live API page on 2026-10-27.
According to the opencode docs, config files support {env:VARIABLE_NAME} substitution, so the key can stay out of the JSON file:
export CGW_API_KEY="cgw-sk-..." # put this in ~/.bashrc or ~/.zshrc to keep it
Put this in opencode.json in your project root. According to the opencode docs, the global file lives at ~/.config/opencode/opencode.json, the project file overrides it, and "configuration files are merged together, not replaced", so the same block also works globally.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"cloudgpu": {
"npm": "@ai-sdk/openai-compatible",
"name": "CloudGPU",
"options": {
"baseURL": "https://cloudgpu.app/v1",
"apiKey": "{env:CGW_API_KEY}"
},
"models": {
"deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash" },
"kimi-k3": { "name": "Kimi K3" },
"kimi-k2.6": { "name": "Kimi K2.6" },
"glm-5.3-flash": { "name": "GLM-5.3 Flash" }
}
}
}
}
Field guide, according to the opencode docs (Providers → Custom provider):
cloudgpu is the provider ID. You choose it, and it becomes the prefix in cloudgpu/<model>.npm: "@ai-sdk/openai-compatible for OpenAI-compatible providers (for /v1/chat/completions)".options.baseURL is the API endpoint; options.apiKey is optional "if not using auth".models: each key must be the exact ID the endpoint serves. name is only the label in the UI.Only want the two headline models? Delete the kimi-k2.6 and glm-5.3-flash lines.
/connect instead of apiKeyAccording to the opencode docs, you can run /connect, scroll to Other, enter the provider ID (cloudgpu), and paste the key. The docs warn that this "only stores a credential", so you still need the provider block, just without the apiKey line.
Check from the command line that opencode sees the provider. According to the opencode CLI docs, opencode models [provider] lists models in provider/model form:
opencode models cloudgpu
The output should look like this (illustrative, not a captured run):
cloudgpu/deepseek-v4.1-flash
cloudgpu/glm-5.3-flash
cloudgpu/kimi-k2.6
cloudgpu/kimi-k3
Then pick one with -m in provider/model form. The dot in v4.1 is part of the ID:
opencode -m cloudgpu/deepseek-v4.1-flash
opencode run -m cloudgpu/kimi-k3 "Explain what this repo's main entry point does"
Inside the TUI, according to the opencode docs, you "run the /models command and your custom provider and models will appear in the selection list". To make one the default, the opencode models docs use a top-level "model" key in provider_id/model_id form, here "model": "cloudgpu/deepseek-v4.1-flash".
Which one for what? There are no benchmarks here, so try them on your own repo. All four are in the config, so comparing them takes one switch.
If opencode misbehaves, take it out of the loop. First, list the IDs your key can use:
curl https://cloudgpu.app/v1/models \
-H "Authorization: Bearer $CGW_API_KEY"
Without the header this returns 401 with missing_authorization, which is expected. The API docs list it as "No Authorization header." (As of 2026-10-27, see /api/docs.)
Then send one chat request with the openai Python package:
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
base_url="https://cloudgpu.app/v1",
api_key=os.environ["CGW_API_KEY"],
)
for model in ["deepseek-v4.1-flash", "kimi-k3"]:
resp = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Reply with: ok"}],
)
print(model, resp.choices[0].finish_reason, repr(resp.choices[0].message.content))
If a model comes back with empty or None content and finish_reason is "length", the reply ran out of output tokens: leave max_tokens unset or set it higher.
1. The model doesn't show up, or you get 400 model_not_found. The keys under models must match the IDs from GET /v1/models character for character. Watch for short aliases (deepseek-flash), a missing version segment (deepseek-v4-flash vs deepseek-v4.1-flash) and capital letters. Also check that the provider ID is the same in all three places: the provider key, the ID typed into /connect (if you used it), and the cloudgpu/ prefix. According to the opencode docs, opencode auth list shows which credentials are stored.
2. The base URL is wrong. The AI SDK docs describe baseURL as the URL prefix for API calls, and their example sends chat requests to <baseURL>/chat/completions:
https://cloudgpu.app/v1 correct
https://cloudgpu.app missing /v1
https://cloudgpu.app/v1/chat/completions too specific
3. An error asking for an Authorization: Bearer header. According to the opencode docs, an unset {env:...} variable "will be replaced with an empty string", so the request goes out without a key. Check the variable in the shell you launch opencode from:
echo "${CGW_API_KEY:+set}" # prints "set" if the variable is present
After editing ~/.bashrc or ~/.zshrc, open a new terminal or source the file. IDE terminals and desktop launchers may not read your shell profile.
4. Empty replies. Check finish_reason as in Step 4. In opencode, the per-model knob the docs describe is the optional limit block (limit.context = "maximum input tokens the model accepts", limit.output = "maximum tokens the model can generate"). If you add it, use real values from the model provider's docs, not guesses.
5. 401 invalid_api_key, 402 insufficient_balance or 429 rate_limit_exceeded. The CloudGPU API docs describe them like this (As of 2026-10-27, see /api/docs):
401 invalid_api_key: "Key unknown or revoked."402 insufficient_balance: "Top up."429 rate_limit_exceeded: "Per-minute or per-day limit hit."The documented rate limits are "Per API key, per minute: 100 requests" and "Per account, per day: 10,000 requests", and the docs add: "These defaults exist to stop abuse during the public beta. Contact us if you need them raised — happy to do it for any genuine workload, just need to know the use case."
Usage is billed per token from a prepaid balance (card, Alipay, Google Pay, Apple Pay or USDT). Keys, the model table and per-model rates are on the CloudGPU API page.
Which npm package does an OpenAI-compatible custom provider use in opencode?
@ai-sdk/openai-compatible. According to the opencode docs, it's the package for providers that use /v1/chat/completions.
What base URL goes in options.baseURL?
https://cloudgpu.app/v1, with /v1 and nothing after it.
Can the model ID contain a dot, like deepseek-v4.1-flash?
Yes. Use it exactly as listed, in provider/model form: -m cloudgpu/deepseek-v4.1-flash.
Why does a model sometimes return an empty answer?
Check finish_reason. If it is "length", the reply ran out of output tokens; raise max_tokens or leave it unset.
Do I have to put the API key in opencode.json?
No. Use "apiKey": "{env:CGW_API_KEY}" so the file only holds a reference. According to the opencode docs, /connect can store the credential instead.
Are there rate limits? Yes. The API docs list "Per API key, per minute: 100 requests" and "Per account, per day: 10,000 requests", and say: "These defaults exist to stop abuse during the public beta. Contact us if you need them raised — happy to do it for any genuine workload, just need to know the use case." As of 2026-10-27, see /api/docs.
]]>Originally published on cloudgpu.app.
Most coding agents let you swap the model behind them by changing one setting: the OpenAI-compatible base URL. This post shows how to put DeepSeek V4 behind Cursor, Continue, Cline and aider using the CloudGPU gateway, paid from one prepaid balance. Switching back later is the same one-field change.
Disclosure: I work on CloudGPU.
| Setting | Value |
|---|---|
| Base URL | https://cloudgpu.app/v1 (no trailing slash) |
| API key | a cgw-sk-... key from the API console, stored in $CGW_API_KEY |
| Model ID | deepseek-v4-flash, deepseek-v4.1-flash or deepseek-v4-pro |
The model IDs are copied from the model table on the live API page (checked 2026-10-27). Type them exactly: a wrong case or a missing dot returns 400 model_not_found.
cursor) and copy it. It starts with cgw-sk- and is shown only once, so keep it in a password manager.export CGW_API_KEY="cgw-sk-..."
curl https://cloudgpu.app/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CGW_API_KEY" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hello"}]}'
A JSON reply with choices[0].message.content means the key and balance work. To list the model IDs your key can use, call GET https://cloudgpu.app/v1/models with the same Authorization header. Without a key it returns 401 with missing_authorization, which is expected.
The same check from the openai Python package, if your agent framework is built on it:
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
base_url="https://cloudgpu.app/v1",
api_key=os.environ["CGW_API_KEY"],
)
resp = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Explain what this regex matches: ^\\d{3}-\\d{4}$"}],
)
print(resp.choices[0].message.content)
Per Cursor's help page on using your own API key, open Cursor Settings > Models and paste your cgw-sk-... key into the API key field. That page doesn't cover the base URL. As of 2026-10-27, per Cursor staff on the forum, using your own key through the base URL override "is an officially supported setup" (forum thread). Turn on the option to override the base URL and set it to https://cloudgpu.app/v1. Then add deepseek-v4-flash (or deepseek-v4.1-flash / deepseek-v4-pro) as a custom model and select it in Chat. Setting names change between Cursor versions, so follow what your build shows.
Two things to know, per Cursor: custom API keys only work with chat models, and Tab completion keeps using Cursor's built-in models. As of 2026-10-27, per Cursor staff on the forum (same thread), while the base URL override is on, requests for Cursor's own models go to the custom endpoint too, so turn the override off when you switch back to them.
Per the Continue docs, the current config format is config.yaml (~/.continue/config.yaml; the older config.json is deprecated). It uses the openai provider for any OpenAI-compatible endpoint; you change apiBase.
The Continue docs say the VS Code and JetBrains extensions can't read variables exported in your shell, so put the key in ~/.continue/.env (plain NAME=value, no quotes):
CGW_API_KEY=cgw-sk-...
Then reference it from config.yaml:
name: CloudGPU
version: 0.0.1
schema: v1
models:
- name: DeepSeek V4 Flash (CloudGPU)
provider: openai
model: deepseek-v4-flash
apiBase: https://cloudgpu.app/v1
apiKey: ${{ secrets.CGW_API_KEY }}
roles: [chat, edit, apply]
If your config.yaml already has name, version and schema, add only the model entry. Restart the IDE after editing .env, and don't commit a .env file that contains the key. Swap the model: line for deepseek-v4.1-flash or deepseek-v4-pro to try the others.
Per the Cline docs, open the Cline settings panel, set API Provider to "OpenAI Compatible" and fill in three fields: Base URL https://cloudgpu.app/v1, your API key, and model ID deepseek-v4-flash, deepseek-v4.1-flash or deepseek-v4-pro. Run a small task first to check the model handles your workflow before you hand it a long one.
The aider docs connect to any OpenAI-compatible endpoint through OPENAI_API_BASE and OPENAI_API_KEY, with the model name prefixed by openai/. Reuse the key you already exported:
export OPENAI_API_KEY="$CGW_API_KEY"
export OPENAI_API_BASE=https://cloudgpu.app/v1
aider --model openai/deepseek-v4-flash
Any other framework that accepts an OpenAI-compatible base URL takes the same two values.
All three IDs are in the model table on the API page, each with its own rate. deepseek-v4-flash is the model used in the API docs examples, so start there. Then try deepseek-v4.1-flash or deepseek-v4-pro on a real task in your agent and keep the one that fits. Check DeepSeek's own docs for each model's context length and reasoning behaviour.
If a reply comes back with an empty content and finish_reason="length", raise max_tokens or leave it unset.
Usage is paid per token from a prepaid balance; there's no subscription, and the balance doesn't expire. Top up on the billing page by card, Alipay, Google Pay, Apple Pay, or USDT on TRC-20. Rates change, so this post doesn't repeat them: the per-token rate for each model is in the table on the CloudGPU API page. GPU rental rates are on /pricing, and the same balance pays for both.
https://cloudgpu.app/v1 and the key has no leading or trailing spaces.429 rate_limit_exceeded: the public-beta default is 100 requests per minute per API key and 10,000 requests per day per account. Use a second key for parallel agents, or email support to raise the limit.402 insufficient_balance: top up on the billing page.CloudGPU is in public beta with no SLA. If a model returns 503 upstream_not_configured, the API docs say it is temporarily unavailable: retry later or use another model.
Which base URL do I use in Cursor, Continue or Cline?https://cloudgpu.app/v1, with a cloudgpu.app API key that starts with cgw-sk-.
Which DeepSeek model IDs can I use?deepseek-v4-flash, deepseek-v4.1-flash and deepseek-v4-pro, as listed on the API page. Add the ID as a custom model in the tool and select it.
Does this change Cursor tab completion? No. Per Cursor's docs, custom API keys only work with chat models, and Tab completion keeps using Cursor's built-in models.
Are embeddings supported? Not yet, per the API docs. If your tool needs an embeddings model for codebase indexing, configure that separately.
]]>On CloudGPU, destroying an instance deletes its disk, and there is no persistent storage across instances yet, so anything you want to keep — checkpoints, LoRA adapters, generated images, logs — must be copied off the machine before you destroy it. An instance is also destroyed automatically if your balance runs out. This post is the checklist and the commands we use.
| Event | What happens to the disk |
|---|---|
| You click Destroy | The instance stops, billing settles, the disk is deleted |
| Your balance cannot cover the next hour | The instance is destroyed and its disk deleted |
| You want to “pause” and resume tomorrow | Not available yet: stopping releases the GPU; you start a new instance next time |
| The JupyterLab tab or SSH session closes | Nothing — the instance keeps running (and billing) until destroyed |
Because billing is per minute, the economical pattern is: work, copy outputs off, destroy. The minutes spent copying are billed like any other minute, so plan the copy rather than leaving the instance up “just in case”.
| Destination | Good for | Command family |
|---|---|---|
| Your own computer | Small to medium outputs, anything private | rsync / scp over SSH |
| Hugging Face Hub (private repo) | LoRA adapters, merged models, datasets you will reuse | huggingface-cli upload |
| S3-compatible object storage (S3, R2, B2…) | Large checkpoints, image batches, logs | rclone copy |
| JupyterLab download button | A handful of small files | Browser |
Do not push large files through the instance’s public API endpoint: the tunnel is capped at 3 MB/s and is meant for API responses, not file transfer. Use SSH or an upload from the machine.
Outbound speed from the supplier data centre to a given destination varies. Test with a small file first and add the copy time to your budget.
# run on your laptop; user, host and port are on the instance page
rsync -avP -e "ssh -p <ssh-port>" <ssh-user>@<ssh-host>:/workspace/out/ ./run-2026-10-23/
-P shows progress and resumes partial files if the connection drops. Re-run the same command at the end; rsync only copies what changed.
# laptop: pull new checkpoints every 10 minutes while training runs
while true; do
rsync -aP -e "ssh -p <ssh-port>" <ssh-user>@<ssh-host>:/workspace/out/ ./run/ && date
sleep 600
done
Pair it with frequent saves in your trainer (for LLaMA-Factory, save_steps in the YAML; for Hugging Face Trainer, save_steps and save_total_limit).
pip install -U "huggingface_hub[cli]"
huggingface-cli login # paste a fine-grained write token
huggingface-cli upload <your-user>/qwen3-8b-qlora-run1 /workspace/out/qwen3-8b-qlora . --private
Use a fine-grained token scoped to the one repo and revoke it after the run.
curl https://rclone.org/install.sh | bash # you are root on the instance; or: apt-get install -y rclone
rclone config # add your S3 / R2 / B2 remote
rclone copy /workspace/out remote:my-bucket/run1 --progress --transfers 8
tar -C /workspace -czf /workspace/outputs.tgz out/
Thousands of small PNGs or log files copy much faster as one archive.
| # | Check | Why |
|---|---|---|
| 1 | Training or batch has finished (or you saved a checkpoint) | Partial runs are lost on destroy |
| 2 | Outputs copied and verified (file count, sizes, or sha256sum) |
A failed copy looks like a successful one until you need it |
| 3 | Configs, scripts and the exact command line saved | So you can reproduce the run on a fresh instance |
| 4 | Environment captured (pip freeze > requirements.txt) |
Next instance starts clean |
| 5 | Tokens you pasted on the machine revoked | Good hygiene, even though the disk is deleted |
| 6 | Click Destroy | Unused minutes of the pre-authorised hour return to your balance |
Two numbers keep long runs safe:
size ÷ measured upload speed, then add it to the job. On a card listed at $0.59/h, 10 extra minutes of copying cost about $0.10.Stock and prices change during the day; check the Deploy page. Billing rules are on per-minute billing.
If your data must not leave a particular jurisdiction, do not train on it here, and choose your copy destination with the same care.
What happens to my files when I destroy a cloud GPU instance on CloudGPU?
The disk is deleted. Copy anything you need off the machine before you destroy it.
Is there persistent storage between instances?
Not yet. Stopping releases the GPU and the next session starts on a new instance, so keep checkpoints and outputs elsewhere.
What if my balance runs out during training?
The instance is destroyed and its disk deleted. Keep enough balance for the whole run plus a margin, and copy checkpoints off as you go.
How do I download checkpoints from a rented GPU?
Use rsync or scp over SSH, or upload from the machine to a model hub or object storage. Do not use the public API endpoint, which is capped at 3 MB/s.
Am I billed while I copy files off?
Yes. Billing runs per minute until you destroy the instance, so plan the copy and destroy promptly afterwards.
If the checkpoints you are saving come from a fine-tune, the LoRA and QLoRA fine-tuning page covers card choice and billing for those runs. Originally published at cloudgpu.app.
]]>Prices are list prices read on 2026-10-23 23:58 Beijing time (UTC+8); current prices on /deploy take precedence.