mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
Update index.js
This commit is contained in:
1 parent
a7599c41b5
commit
ffe4dd0d37
1 file changed
+1
-3
@@ -31,8 +31,7 @@ export default function artplayerPluginDanmukuMask(option = {}) {
|
||||
async function initTensorFlow() {
|
||||
try {
|
||||
await tf.setBackend('webgl');
|
||||
console.log('Using WebGL backend');
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
console.warn('WebGL backend not available, falling back to CPU');
|
||||
await tf.setBackend('cpu');
|
||||
}
|
||||
@@ -56,7 +55,6 @@ export default function artplayerPluginDanmukuMask(option = {}) {
|
||||
try {
|
||||
segmenter = await bodySegmentation.createSegmenter(model, segmenterConfig);
|
||||
isInitialized = true;
|
||||
console.log('Segmenter initialized successfully');
|
||||
} catch (error) {
|
||||
console.error('Error initializing segmenter:', error);
|
||||
isInitialized = false;
|
||||
|
||||
Reference in new issue
Block a user