In the "small but beautiful" world of pixel screens, a great image and an engaging experience often determine whether users will pay for a product.
From in-car displays and desktop clocks to children’s creative pixel boards and smart home auxiliary displays, pixel screens on smart devices are rapidly becoming "mini galleries" for users to express themselves. Users crave real-time, fast creation of personalized pixel patterns — expressions, icons, animals, plants, and more.
However, today’s mainstream cloud-based text-to-image solutions struggle to meet this demand for real-time interaction. The pain points are clear:
Facing these industry pain points and challenges, Tuya Smart has launched the AI Pixel Screen Text-to-Image application development solution based on its On-App AI technology architecture. Leveraging proprietary mobile image generation model technology, this solution breaks the constraints of traditional approaches and brings an unprecedented creative experience to pixel screen devices of all types.
To break through the bottleneck of cloud-based text-to-image generation, Tuya’s AI Pixel Screen Text-to-Image solution uses On-App AI on-device model technology — running a lightweight pixel generation model inside the mobile app to achieve local pixel image generation without relying on cloud inference. This is ideally suited for pixel screen businesses with high demands for real-time performance, cost efficiency, and offline availability.
On-Device Generation Solution Diagram

In the actual experience, users simply select the tags they want to generate in the app — such as "sunflower," "bird," or "cactus" — and the app performs local inference, quickly generating corresponding personalized pixel-style patterns within 1–2 seconds.
Once generated, pixel images can be saved directly and pushed to the pixel screen device via Bluetooth high-throughput data transfer for display, delivering a truly efficient, smooth, and sustainable intelligent pixel content creation experience.
Under this solution, brand owners incur absolutely no cloud inference costs. The more users create, the lighter the burden on the platform — laying a solid foundation for long-term, scalable pixel screen business deployment.
Below is the Tuya Smart On-App AI overall architecture diagram, encompassing four major modules: device side, cloud model management, mobile on-device AI, and AI scenario templates.
Tuya Smart On-App AI Overall Architecture Diagram

The On-App AI Pixel Screen Image Generation solution uses TensorFlow Lite for mobile model deployment, offering efficient inference, low latency, and low power consumption advantages — supporting local offline operation to improve user experience and response speed.
Sample output using the proprietary mobile image generation model: 64×64 pixel images displayed on a pixel screen.
64×64 Pixel Images Displayed on Pixel Screen

Model Image Generation and Dynamic Management Flow Diagram

Core business flow:
Dynamic Dataset Diagram

Pipeline overview:
Sample dataset preview:
Dataset Sample Preview

1.1 Dynamic Dataset
Through AI generation technology, the dataset has the potential for continuous updating and expansion. The solution can incorporate user-defined elements — such as style transfer and tone adjustments — to generate specific personalized pixel images.
Based on current user feedback data and market trends, we can generate targeted new datasets for rapid iteration to meet user requirements. Regular update packages with new styles and elements will also be released to keep the dataset fresh and engaging.
2.1 Lightweight Generation Model
The core of Tuya’s AI Pixel Screen Text-to-Image solution for on-device pixel generation is Tuya’s proprietary lightweight image generation model — optimized based on the DDIM (Denoising Diffusion Implicit Models) inference framework, with model tuning and acceleration tailored to on-device computing characteristics.
Working in conjunction with a lightweight detection model, the solution achieves efficient mobile text-to-image generation with second-level generation speed — balancing generation quality and real-time interaction without relying on cloud services.
2.2 Dynamic Model Management
Tuya’s AI Pixel Screen Text-to-Image solution uses an on-demand loading dynamic model management mechanism. Users download, update, and deploy models online based on actual needs, ensuring the app always runs on the optimal model version. This enables rapid adoption of the latest algorithms during feature iterations and dynamic dataset updates, avoids bundling all models into a single package, effectively reducing initial installation size and storage footprint.
3.1 Model Quality Optimization
To further improve generation quality, Tuya’s technical team introduced Classifier-Free Guidance (CFG) technology during model training and inference — a technique for conditional diffusion models that enhances the model’s understanding of tag semantics, making the final generated pixel images more stable in structure, texture, and style, significantly improving image generation quality.
Before vs. after optimization comparison:
CFG Optimization Before/After Comparison

3.2 Real-time Interactive Processing
In image generation scenarios, mobile-side AI processing has particularly pronounced advantages over cloud-based solutions. Mobile image generation completes inference and computation directly on the local device using phone processing power — no network transmission required, saving bandwidth and server compute resources while effectively reducing latency.
For example, generating "oak tree," "lavender," "olive tree," or "succulent" using the phone’s local model capability takes only 1–2 seconds with real-time response.
Single-Image Inference Performance:
This solution fully leverages mobile hardware capabilities and is compatible with mainstream iOS and Android devices. In performance testing, high-end and mid-range devices typically complete generation within 0.5–1.5 seconds, while even low-end devices stably finish inference within a few seconds. This level of speed provides a decisive experience advantage for pixel screen content creation scenarios requiring real-time feedback.
iOS Inference Performance Data

Android Inference Performance Data

Performance test results show that the model’s inference latency, memory consumption, and CPU usage on mobile are all excellent — meeting production deployment requirements and ready for business adoption.
Tuya’s AI Pixel Screen Text-to-Image solution can be widely applied to various devices that require personalized pixel pattern creation:
To help developers efficiently bring AI applications to life, the Tuya Developer Platform provides diverse support — including standardized AI features for different product categories, rich agent templates, and convenient panel deployment tools — comprehensively ensuring rapid AI application deployment across multiple dimensions.
AI Pixel Screen Text-to-Image Solution: https://developer.tuya.com/cn/miniapp/solution-ai/ability/picture-solution/aiTextToImage/overview
AI Pixel Screen Text-to-Image Template Tutorial: https://developer.tuya.com/cn/miniapp-codelabs/codelabs/on-app-ai-text-to-image/index.html
AI Pixel Screen Text-to-Image Template Source Code: https://github.com/Tuya-Community/tuya-ray-materials?path=template%2FAIPixelScreenTemplate
For any issues during development, please post your questions on the Tuya Developer Forum:
https://www.tuyaos.com/viewforum.php?f=10
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback