The KAGAMI mark КАГАМИ
kagami.bg/academy · lesson · machine-readable viewUPDATED 2026-10-03
IDENTITY
module
GX10-04-80 · Relighting NIM: new lighting for people in video
series
GX10 (local AI server class: NVIDIA GB10, e.g. ASUS Ascent GX10 / DGX Spark)
level
Intermediate
duration
about 2 h
prerequisites
Docker with the NVIDIA Container Toolkit; an NGC personal API key with the NGC Catalog service; driver 571.21 or later; Python and pip for the sample client; ffmpeg; an MP4 (H.264) video; written consent of every person shown
trust_label
UPDATED 2026-10-03 (re-checked against the Relighting NIM documentation, last updated 2026-05-14, and the build.nvidia.com catalogue page) · NOT TESTED: no GB10 machine was available and no command was run; GB10 is not named in the support matrix; whether the image runs on arm64 and on GB10 video encode and decode hardware was not verified; no speed or quality was measured
language
human view: bg · english edition: /en/academy/gx10/ (same file name)
previous / next
04-79_LipSync_Video.html / 04-81_FLUX2_Klein_Fast.html
PURPOSE

Explain, strictly as documented, how the Relighting NIM re-illuminates people in a video to match a target lighting taken from a 360-degree HDR environment map: input, architecture, container launch, health checks, sample gRPC client, options, support matrix and licences, plus the consent and disclosure duties that apply when the appearance of real people is altered. The documented service works on video, not on single images, and no claim is made about GB10 compatibility or speed.

KEY CONCEPTS
COMMANDS / PATHS
CHECKLIST
NEXT MODULE

Series index: kagami.bg/academy/gx10/ · previous: 04-79 LipSync · next: 04-81 FLUX.2 klein · related: 04-60 Deepfake detection, 04-76 Synthetic video detector · offer: Quick experiment (kagami.bg/stalbata/)

SOURCES
TAGS
gx10relightinghdrivideonimgrpcconsentai-act
UPDATED · 03.10.2026

AI Relighting on GX10: New Light on the People in a Video

NVIDIA's Relighting NIM changes the lighting on people in video so that it matches a chosen 360-degree HDR map of an environment: a studio, a street at night, a glasshouse. It runs as a service in a container (gRPC). It changes how real people look, so the lesson starts with consent and disclosure. We have not run any of this ourselves, and GB10 is not among the GPUs listed in the documentation.

⏱ 2 h Intermediate GX10 Relighting NIM · gRPC · ffmpeg People in video · Consent · Disclosure
Relighting NIM (container)🔒 local Sample client (Python, gRPC)🔒 local Trial service in NVIDIA's cloud🌐 global
🔄
UPDATED · 03.10.2026 — what
The lesson was rebuilt from NVIDIA's official documentation (last updated 14 May 2026). The biggest correction: the service works on video (MP4 with H.264), not on single photos. We removed the code that sent photos in base64 to an address /v1/cv/nvidia/relighting and accepted "synthetic light" with sun parameters: the documentation has no such address and no such input. The service is gRPC and has a ready client. We also removed the table of "measured" seconds per frame, the comparison with the cloud, the claim of "batch processing of 500 photos" and the example about a specific organisation. Added: the five ready-made HDR environments, the background modes, the effect parameters, encoding formats and settings, the support table, the licences and the rules on consent and disclosure.
⚠️
What we have not run ourselves
We had no machine of the GB10 class, so there is no "TESTED" label. The commands are copied from the documentation and have not been run. GB10 is not in the support table, and the documentation does not say whether the image is built for ARM64; the service requires video encode and decode hardware (NVENC/NVDEC) and we did not check whether GB10 has it. We have not measured speed, memory or the quality of the result.

01What you will learn

02Before you start

⚖️
The people in the video: consent and disclosure (not legal advice)
Consent. A person's image is personal data (Regulation (EU) 2016/679, Art. 4(1)), and changing how it looks is processing and also touches the person's right to their image. Get written consent from every person shown — for exactly this kind of processing and for the place where the video will be published. Disclosure. Art. 50(4) of Regulation (EU) 2024/1689 requires deployers of a system that produces "deepfake" content (an image that resembles real persons and would falsely appear authentic) to disclose that the content has been artificially generated or manipulated. Whether a plain change of lighting is a "deepfake" is a legal question and depends on the extent of the change; changing the place or background makes it more likely. The safest course is to label as artificially altered every video you publish. Under Art. 113 the Regulation applies from 2 August 2026, with the exceptions listed there; we have not checked for later amendments. Recommendation: for public or paid videos, ask a lawyer.

What the documentation says (as of 03.10.2026)

TopicWhat it says
What it doesApplies lighting from an HDR environment to a video; re-illuminates the people so that they match the target light
How it is builtNeural networks analyse each frame; "AI Green Screen" separates the person from the background; a model projects the chosen HDR environment onto the person; the result is placed on the chosen background
Imagenvcr.io/nim/nvidia/ai4m-relighting:1.1.0 (as in the documentation)
PortsgRPC on 8001; HTTP on 8000 with addresses /v1/health/live, /v1/health/ready, /v1/license, /v1/metadata, /v1/manifest, /v1/metrics
HardwareGPUs with Tensor cores of the Blackwell, Ada, Ampere, Hopper and Turing generations, with NVENC and NVDEC. GB10 is not listed; for ARM64 the documentation says nothing
SoftwareDriver 571.21+; CUDA 12.8.1, TensorRT 10.9.0.34, Triton 2.50.0, DeepStream 8.0
SpeedThe first run includes model loading; on Blackwell the first request may time out — send it again. There are no data for GB10 and we have not measured

Licences (per the official pages, 03.10.2026)

PartLicence per the pageWhat to watch
ModelNVIDIA Open Model LicenseRead the licence for your use
Container (NIM)The "Governing Terms" page in the documentationWe did not check it in detail; read it before use
Trial service on build.nvidia.comNVIDIA API Trial Terms of ServiceThe video is sent to NVIDIA's cloud. Do not upload recordings of people there
Video, HDR files and backgroundsThe licence of each fileCheck who may use them and for what; we did not check the ready-made environments in the service
Sample clients (nim-clients)We did not checkRead the licence file in the repository
⚠️
This is not legal advice
The table points to what the official pages say, and that may change. For a public or paid product, read the texts themselves or ask a lawyer.

03Steps

  1. How relighting works

    First the service separates the person from the background. Then it "lights" the person anew as if they were standing in the chosen environment. The environment is an HDR map — a 360-degree picture that keeps where the light comes from, what colour it is and how strong. Finally the person is placed on a background of your choice: the original, another picture or the HDR environment itself.

    Two things about expectations: the documentation describes video (not single photos), and the result depends on the input — we have not checked how it behaves in poor light, with several people in frame, or with hair and transparent objects. Try it with your own clips.

  2. Prepare the video

    The video is MP4 with H.264. For best performance make it "streamable" — the metadata moves to the start, and the service begins before it has received the whole file:

    bash
    ffmpeg -i input.mp4 -movflags +faststart -c copy output_streamable.mp4

    If the video is not streamable, the service switches to "transactional" mode: it waits for the whole file before it starts. Both modes work, but streaming is recommended. The command is from the documentation and has not been run by us.

  3. Log in to the catalogue and start the service

    Create a personal NGC key with "NGC Catalog" and log in. The key is a password: pass it through an environment variable.

    bash
    export NGC_API_KEY=<your-key>
    echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin

    The user name $oauthtoken is literally so. The start command is from the documentation; we only bound the ports to the local address so they are not visible from outside (the documentation has -p 8000:8000 and -p 8001:8001, plus port 9002 for metrics):

    bash
    docker run -it --rm --name=relighting-nim \
      --runtime=nvidia \
      --gpus all \
      --shm-size=8GB \
      -e NGC_API_KEY=$NGC_API_KEY \
      -e NIM_MAX_CONCURRENCY_PER_GPU=1 \
      -e NIM_HTTP_API_PORT=8000 \
      -e NIM_GRPC_API_PORT=8001 \
      -p 127.0.0.1:8000:8000 \
      -p 127.0.0.1:8001:8001 \
      nvcr.io/nim/nvidia/ai4m-relighting:1.1.0

    We have not run this command. The model profile (NIM_MANIFEST_PROFILE) is not mandatory: if you do not set it, the service chooses by itself according to the card. Set for a different card, it leads to an error at run time. If the service does not start for you, the machine itself may be the reason: the documentation does not list GB10 and does not say whether the image is built for ARM64. The image tag is the one in the documentation today — check the current one in the catalogue.

    • Parallel requests: 1 per card by default (NIM_MAX_CONCURRENCY_PER_GPU).
    • Protection: by default the connection is not encrypted; there are modes tls and mtls (NIM_SSL_MODE). Keep the ports on the local address.
  4. Check that the service is ready

    The documentation has two ways. The first is an HTTP readiness address:

    bash
    curl -s http://127.0.0.1:8000/v1/health/ready

    The second is over gRPC with grpcurl (the documentation shows a package for amd64; on ARM64 take the version for your architecture):

    bash
    wget https://raw.githubusercontent.com/grpc/grpc/master/src/proto/grpc/health/v1/health.proto
    grpcurl --plaintext --proto health.proto localhost:8001 grpc.health.v1.Health/Check

    When ready, the answer of the second is { "status": "SERVING" }.

  5. Run the sample client

    bash
    git clone https://github.com/NVIDIA-Maxine/nim-clients.git
    cd nim-clients/relighting
    pip install -r requirements.txt
    cd scripts
    
    python relighting.py \
      --target 127.0.0.1:8001 \
      --video-input output_streamable.mp4 \
      --output result.mp4 \
      --hdri-id 3

    All parameters are optional; without them the client uses a sample file from the repository and the "Lounge" environment. The numbers of the ready-made environments are: 0 Lounge, 1 Cobblestone Street Night, 2 Glasshouse Interior, 3 Little Paris Eiffel Tower, 4 Wooden Studio. We have not run this command.

    💡
    Your own HDR map
    With --hdr <file.hdr> you pass your own map. Check the licence of the file: many free maps have terms of use. How good the quality is with your own map, the documentation does not say.
  6. Settings for the effect, the background and the encoding

    ParameterWhat it does (per the documentation)
    --hdri-id · --hdrA ready-made environment (0–4) or your own .hdr file
    --pan · --vfovWhere the camera "looks" in the map (angle, default −90°) and the vertical field of view (default 60°)
    --autorotate · --rotation-rateRotates the environment at the chosen rate (degrees per second; default 20)
    --background-source0 — the original video; 1 — your own picture (--background-image); 2 — HDR projection. There is also a solid colour (--background-color)
    --foreground-gain · --background-gainStrength of the lighting on the person and on the background, from 0.0 to 2.0 (default 1.0)
    --blurBackground blur, from 0.0 to 1.0
    --specularHighlights on skin and objects, from 0.0 to 2.0 (default 0)
    --bitrate · --idr-interval · --losslessOutput quality and size: bitrate (client default 10 Mbps), interval between key frames (8) or lossless video

    Examples from the documentation: a blurred background — --blur 0.5; your own picture as a background — --background-source 1 --background-image background.png. Try a weak effect first: stronger does not mean better, and artificial light is easy to notice on faces.

  7. Many clips — one at a time

    By default the service processes one stream per card, so we go through the clips one after another. The script is only a sketch per the documentation and has not been run; the file names are invented:

    bash · batch.sh
    mkdir -p out
    for v in clips/*.mp4; do
      n=$(basename "$v" .mp4)
      [ -f "out/$n.mp4" ] && continue          # already done
      python relighting.py --target 127.0.0.1:8001 \
        --video-input "$v" --output "out/$n.mp4" --hdri-id 4
    done
  8. Review and label the result

    Watch the result at normal and at slow speed: look at the edges around hair and body outline, skin colour, flicker between frames, artefacts in fast movement. Measuring speed: take your own clip, time it from launch to the finished file and note it down — the first run does not count.

    Before publishing, label the video as artificially altered: in the description or caption and, optionally, in the file's metadata (the command is standard ffmpeg and has not been run by us):

    bash
    ffmpeg -i result.mp4 -c copy -metadata comment="AI-altered video: lighting changed" result_labelled.mp4

    Keep the record of the consents too. If the people in the video have not consented, do not publish it.

04Check

Quiz

1. What does the Relighting service work with, per the documentation?

2. What is an HDR environment map?

3. What must you have before you publish the video?

4. Why do you not upload recordings of people to the trial service on build.nvidia.com?

05What next

06Sources

  1. Relighting NIM — documentation 🔒 local — overview, launch, usage, support table.
  2. Relighting — NVIDIA catalogue page 🌐 global — description, model licence, trial-service terms.
  3. NVIDIA-Maxine/nim-clients — sample clients.
  4. EUR-Lex: Regulation (EU) 2016/679 (GDPR) — Art. 4.
  5. EUR-Lex: Regulation (EU) 2024/1689 (AI Act) — Art. 50 and 113.