Your GAN Beauty Effect Needs a Device Budget, Not a Universal “On” Switch Tencent RTC's Beauty AR documentation and low-end optimization guide recommend that developers implement device-aware policies for GAN-powered beauty effects rather than enabling all features universally. A developer demonstrates an application-owned Beauty AR controller in TypeScript that separates consent, capability probing, and fallback states to avoid degrading performance on constrained devices. A GAN-powered beauty effect can look convincing in a product demo and still be the wrong default for a real session. The uncomfortable part is not whether the effect is “AI.” It is deciding what the application should do when appearance processing, segmentation, rendering, and video compete for a limited device budget. If the answer is simply “enable everything and hope,” lower-capability devices pay the price. This is also where writing less integration code can create more engineering responsibility. The durable skill is not producing another effect toggle. It is defining consent, capability, fallback, and verification rules that remain understandable when the renderer fails. In this tutorial, we will build an application-owned Beauty AR controller that: Tencent RTC Beauty AR supports scenarios including real-time beauty filters, makeup, stickers, virtual backgrounds, avatars, gesture recognition, and image or video enhancement. The official overview is the appropriate starting point for checking the features available to your integration: https://trtc.io/document/beauty-ar-overview https://trtc.io/document/beauty-ar-overview For device-tier and degradation guidance, Tencent RTC’s low-end optimization guide recommends adapting the configuration to device capability, using performance-oriented modes, controlling resolution and frame rate, and disabling expensive segmentation or 3D/GAN effects where necessary: https://trtc.io/document/66968 https://trtc.io/document/66968 The code below is deliberately an application policy, not a replacement for the official platform-specific integration instructions. A useful Beauty AR contract separates three decisions that are often collapsed into one checkbox: A user selecting “Full” should not force a constrained device to run every effect. It means the application may use the richest profile that its capability policy currently permits. We will use these states: php awaiting-consent | +-- denied -------------------------- off | +-- granted -- probing -- applying -- running | | | +-- sustained pressure | | +-- failure v applying safer profile | +-- degraded | +-- failed -- off The distinction between degraded and failed matters. Degraded means the session is still providing an intentionally reduced visual experience. Failed means no approved profile could be applied safely, so the effects are off. Use Node.js with TypeScript for the policy and tests: mkdir beauty-budget cd beauty-budget npm init -y npm install --save-dev typescript tsx @types/node mkdir src test Add these scripts to package.json : { "scripts": { "test": "tsx --test test/ / .test.ts" } } The policy can be tested without a camera, a live room, or a specific Beauty AR SDK method. That is intentional: renderer callbacks should provide evidence to the policy, not contain the policy themselves. Create src/policy.ts : export type Tier = "constrained" | "balanced" | "capable"; export type Preference = "off" | "auto" | "basic" | "full"; export type Phase = | "awaiting-consent" | "probing" | "applying" | "running" | "degraded" | "off" | "failed"; export type Feature = | "beauty" | "makeup" | "stickers" | "segmentation" | "gan" | "avatar"; export interface RenderProfile { id: string; mode: "performance" | "quality"; inputHeight: number; targetFps: number; features: Feature ; } const tierProfiles: Record