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
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.
public TEBeautyKit(Context context, boolean isEnableHighPerformance)
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)
};
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.
+ (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.
Was this page helpful?