Skip to main content

Integration Issues

Q: What to do if engine creation fails?

A: Check the following:
  • Confirm appId and appKey are correct
  • Check if network connection is normal (online verification required)
  • Check browser console for error messages
  • Confirm SDK version is latest
  • Check if browser supports modern web technologies

Q: How to check if SDK loaded successfully?

A: You can check in the following ways:

Q: Module loading error at runtime?

A: Possible causes and solutions:
  • Network issue: Check network connection, ensure npm registry is accessible
  • CORS issue: Ensure server has correct CORS headers configured
  • File path error: Check if file path is correct
  • Browser not supported: Use modern browsers (Chrome 57+, Firefox 52+, Safari 11+, or Edge 16+)

Q: How to update version?

A: Update the npm package:
Or specify a version:

Function Issues

Q: Beauty effect is not obvious?

A: You can try:
  • Increase beauty parameter values (range 0.0-1.0)
  • Ensure corresponding beauty type is enabled
  • Check if image quality is clear enough
  • Confirm face detection is working normally
  • Try using FrameType.Image mode for better effects

Q: Beauty effect is excessive or distorted?

A: Recommendations:
  • Lower beauty parameter values
  • Check if parameter combinations are reasonable
  • Avoid enabling too many beauty types simultaneously
  • Adjust parameters based on image quality

Q: Virtual background not working?

A: Check:
  • Set virtual background options
  • Check if background image is correctly loaded
  • Confirm image format is supported (PNG, JPG)
  • Check if image file exists and is readable

Q: Processed image is black?

A: Possible causes:
  • Image data format is incorrect
  • Canvas context acquisition failed
  • Image dimensions are 0

Performance Issues

Q: Processing speed is slow?

A: Optimization recommendations:
  • Use FrameType.Video for real-time processing
  • Lower image resolution
  • Reduce number of simultaneously enabled beauty types
  • Avoid image processing on main thread
  • Use OffscreenCanvas (if supported)

Q: High memory usage?

A: Solutions:
  • Release ImageData objects promptly
  • Avoid frequently creating and destroying engine instances
  • Reuse Canvas and ImageData objects
  • Use object pool pattern to manage image buffers

Q: Application lagging or crashing?

A: Troubleshooting steps:
  • Check if image processing is on main thread
  • Confirm resource release is complete
  • Check console for error messages
  • Check if parameter values are within valid range (0.0-1.0)
  • Use browser performance analysis tools

Compatibility Issues

Q: Which browsers are supported?

A: Modern browsers with WebAssembly support:
  • Chrome 57+
  • Firefox 52+
  • Safari 11+
  • Edge 16+

Q: What to note when using on mobile?

A: Recommendations:
  • Lower image resolution to improve performance
  • Use FrameType.Video mode
  • Appropriately lower beauty parameter values
  • Pay attention to memory usage, release resources promptly

Other Issues

Q: How to use in Vue/React?

A: Refer to the following examples: Vue 3:
React:

Q: How to handle beauty effects after image upload?

A: Example code: