Download README.md from waveshaker/universal-lora-studio-gui: direct link, hf CLI and curl.
- Browser
- Download file 4.42 kB
-
https://huggingface.co/spaces/waveshaker/universal-lora-studio-gui/resolve/main/README.md
- Command line
-
hf download hf://spaces/waveshaker/universal-lora-studio-gui/README.md
-
curl -L -o README.md https://huggingface.co/spaces/waveshaker/universal-lora-studio-gui/resolve/main/README.md
title: π UNIVERSAL LORA STUDIO - GUI(TEST)
emoji: π§ͺ
colorFrom: gray
colorTo: pink
sdk: static
pinned: false
β‘ Universal LoRA Studio - GUI Client
A lightning-fast native UI that performs secure ZeroGPU token handshakes, polls backend generation metrics in real-time, and renders character galleries with physical spring animations.
βοΈ System Architecture
This Space is a 100% native, lightweight Static Web UI (HTML/CSS/JS) designed to serve as the frontend for the π¨Universal Model Character LoRA Studio backend. To overcome Hugging Face's cross-space CORS restrictions and manage ZeroGPU billing securely, it utilizes a highly decoupled "Proxy-Driven" architecture.
ποΈ System Topology (Frontend Perspective)
| Layer | Core Components | Role & Responsibility |
|---|---|---|
| π₯οΈ UI Client (This Space) |
β’ Native HTML/JS β’ Physics Animations β’ State Locks |
Renders the gallery, handles smooth spring animations, and manages the complex UI state without heavy frameworks. |
| π Auth & Token (Browser Window) |
β’ MessageChannel β’ Timeout Fallback |
Communicates securely with the HF parent window to extract the x-ip-token for ZeroGPU billing. |
| π API Interface (Cross-Origin) |
β’ Fetch / REST β’ 100ms Polling β’ Error Handling |
Submits payloads to the remote backend, intercepts real-time JSON logs, and gracefully handles backend wake-up delays. |
| πΌοΈ Media Pipeline (Client Side) |
β’ WebP Render β’ Cache Busting β’ EXIF Metadata |
Fetches the final physical image URL, handles cache-busting query params, and displays the generated result. |
π Request Lifecycle
[User] ββ(Access via Browser)βββΊ [This Native Studio UI]
β
βββΊ 1. Handshake with HF Parent (Extract x-ip-token)
β
βΌ
[Submit POST /api/generate]
βββ Validate Dimensions (Frontend)
βββ Attach Token
βββ Handle UI Loading States
β
βΌ
[Poll GET /api/status/{id}]
βββ Parse real-time logs & metrics
βββ Animate progress via requestAnimationFrame
βββ Render final WebP image
π One-Sentence Summary
A lightning-fast native UI that performs secure ZeroGPU token handshakes, polls backend generation metrics in real-time, and renders character galleries with physical spring animations.
π οΈ Key Frontend Features
Building the UI from scratch with native JS allowed us to bypass the heavy overhead of frameworks (like React or Vue) and integrate directly with the ZeroGPU lifecycle.
- π Seamless ZeroGPU Auth: Implements a
MessageChannelhandshake with the HF parent window to securely extract thex-ip-token. Includes a 2-second timeout fallback and a dynamic warning toast for anonymous quota users. - β‘ Real-Time Log Interceptor: Features a highly optimized polling mechanism (100ms interval) that parses raw JSON metrics from the ComfyUI backend, categorizes them into pipeline stages (Queueing, Model Loading, Sampling), and prints them with animated typewriter effects.
- πͺ Physics-Based Animations: The character gallery features custom spring animations (
stiffness: 280,damping: 0.7) calculated viarequestAnimationFrame. No CSS keyframes, no external librariesβpure, buttery-smooth 60fps rendering. - π‘οΈ State & Concurrency Locks: Employs an
isGalleryFetchingmutex and intelligent DOM diffing (Smart Scroll & Debounce) to prevent UI flickering and API spam during rapid architecture switches (e.g., MOSS β FLUX).
π Ecosystem Links
- πΌοΈ Browse the LoRA Gallery - Explore 1000+ community characters.
- π Dataset