mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Fix server crash on local captioning
This commit is contained in:
		| @@ -31,12 +31,16 @@ const tasks = { | ||||
| } | ||||
|  | ||||
| async function getRawImage(image) { | ||||
|     const buffer = Buffer.from(image, 'base64'); | ||||
|     const byteArray = new Uint8Array(buffer); | ||||
|     const blob = new Blob([byteArray]); | ||||
|     try { | ||||
|         const buffer = Buffer.from(image, 'base64'); | ||||
|         const byteArray = new Uint8Array(buffer); | ||||
|         const blob = new Blob([byteArray]); | ||||
|  | ||||
|     const rawImage = await RawImage.fromBlob(blob); | ||||
|     return rawImage; | ||||
|         const rawImage = await RawImage.fromBlob(blob); | ||||
|         return rawImage; | ||||
|     } catch { | ||||
|         return null; | ||||
|     } | ||||
| } | ||||
|  | ||||
| function getModelForTask(task) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user