tencent cloud

Feedback

High-Performance Mode Usage Guide

Last updated: 2024-07-05 12:41:43

    What is High-Performance Mode?

    When High-Performance Mode is enabled, the beauty feature occupies less resources on your system's CPU/GPU. This effectively mitigates the heating and lagging issues of your mobile device and is particularly beneficial for extended operation on low-end devices.
    Note: When High-Performance Mode is enabled, the skin smoothing effect is less natural than that in Regular Mode, and the following beauty options will be unavailable:
    1. Eyes: Eye Width, Eye Level, Puffy Eye Removal.
    2. Eyebrows: Angle, Distance, Height, Length, Thickness, Brow Peak.
    3. Mouth: Smile Lips.
    4. Face: Chin Retraction, Wrinkle Removal, Nasolabial Fold Removal. In versions prior to SDK 3.7.0, Slim Face (Natural, Goddess, Handsome) will also be unavailable.
    5. Nose: Nasal Bridge, Root of the Nose.
    It is recommended to enable High-Performance Mode only on low-end devices, while mid-to-high-end devices should use Regular Mode for better beauty effects.

    How to Enable High-Performance Mode

    Android
    iOS
    Flutter
    Method 1
    If you are directly using the XmagicApi object, then call the following API immediately after creating the XmagicApi object to enable High-Performance Mode:
    For SDK 3.7.0 and later: Call the enableHighPerformance method.
    For SDK earlier than 3.7.0: Call the setDowngradePerformance method.
    Method 2
    If you are using the TEBeautyKit object, you can use the following method to enable High-Performance Mode.
    /** * @param context Application context * @param isEnableHighPerformance Whether to enable High-Performance Mode */ public TEBeautyKit(Context context, boolean isEnableHighPerformance)
    /** * * Asynchronously create a TEBeautyKit object * @param context Android application context * @param isEnableHighPerformance Whether to enable enhanced mode * @param initListener Initialize the callback interface. */ public static void create(@NonNull Context context, boolean isEnableHighPerformance, @NonNull OnInitListener initListener)
    Method 1
    If you are directly using the XMagic object, you can enable High-Performance Mode during the initialization of XMagic:
    For SDK 3.7.0 and later: Set enableHighPerformance to YES in the assetsDict dictionary.
    For SDK earlier than 3.7.0: Set setDowngradePerformance to YES in the assetsDict dictionary.
    NSDictionary *assetsDict = @{
    @"core_name":@"LightCore.bundle",
    @"root_path":[NSBundle mainBundle] bundlePath],
    @"setDowngradePerformance":@(YES)//YES: Enable High-Performance Mode; NO: Do not enable High-Performance Mode. By default, High-Performance Mode is not enabled.
    };
    self.xmagic = [[XMagic alloc] initWithRenderSize:CGSizeMake(720, 1280) assetsDict:assetsDict];
    
    Method 2
    If you are using the TEBeautyKit object, you can use the following method to enable High-Performance Mode.
    /** * * Create a TEBeautyKit object * @param isEnableHighPerformance Whether to enable High-Performance Mode YES: Enable High-Performance Mode; NO: Do not enable High-Performance Mode * @param initListener Initialize callback interface. */
    + (void)create:(BOOL)isEnableHighPerformance onInitListener:(OnInitListener _Nullable )onInitListener;
    
    You can enable High-Performance Mode by calling the setDowngradePerformance method of TencentEffectApi.
    Note:
    This method needs to be called before the beauty feature is started, that is, before the enableCustomVideoProcess method in TRTC or Live is called.
    
    
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support