SShortSingh.
Back to feed

Developer solves browser ML freeze by optimizing TensorFlow.js WebGL shader compilation

0
·1 views

A developer encountered severe performance issues while running a photo enhancement tool entirely in the browser using TensorFlow.js on WebGL. The application froze for up to 40 seconds during processing, primarily due to WebGL shader recompilation triggered by varying tensor shapes. Key optimizations included standardizing tensor shapes, enabling specific WebGL flags to reuse compiled programs, and managing GPU memory more efficiently. These changes drastically reduced processing times and eliminated the page freeze, significantly improving user experience.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Google releases Gemma 4 open AI model for complex logic and agentic workflows.

Google has officially released Gemma 4, a new open-model AI family. The model is designed for complex reasoning, agentic workflows, and offers multimodal capabilities with a 256K context window. It is currently available for deployment on Google Cloud, Vertex AI, and other platforms. This announcement is separate from industry reports about a future flagship model called Gemini 4, which remains unconfirmed by Google.

0
ProgrammingDEV Community ·

Developer tests in-browser translation, finds 30% of phrases wrong in meaning

A developer tested a free, privacy-focused browser-based machine translation tool that processes text locally. Using 30 English-Russian phrases, the evaluation found 30% had a meaning-altering error, while 43% were fully correct. The tool struggled significantly with idioms, casual speech, and ambiguous legal or technical phrases. Following benchmarks against several API-based models, the developer replaced the engine with a server-side model for improved accuracy, though this sacrifices the original privacy benefit.

0
ProgrammingDEV Community ·

Developer creates free 563-drug harm reduction library using Cloudflare's free tier

A developer has created plugreports, a free harm-reduction library containing profiles for 563 drugs and 61 mixing danger guides in nine languages. The platform provides verified hotlines across nine regions and an identification video library to offer factual information instead of forum speculation. The entire system runs on Cloudflare's free tier using a custom Python script that generates approximately 1,100 static HTML pages with structured data. Machine translation via Workers AI handled bulk translation of content, with human review possible through an admin panel. The project was motivated by search data showing high volume for drug identification and safety questions where inaccurate information could be dangerous.

0
ProgrammingDEV Community ·

OpenAI launches Dots agents, developer creates open-source local alternative called Sparks

OpenAI launched Dots, persistent background AI agents, on Tuesday. A developer created Flash, an open-source alternative that runs locally within 24 hours. The developer's version, called Sparks, operates on user-selected models through Ollama and continues working after the application closes. Sparks are configured with specific goals, schedules, and boundaries via simple commands or requests. Each spark functions autonomously, files reports, and can be interacted with through a chat interface.

Developer solves browser ML freeze by optimizing TensorFlow.js WebGL shader compilation · ShortSingh