diff --git a/index.html b/index.html
index 8684af476..0ce0b7e99 100644
--- a/index.html
+++ b/index.html
@@ -5,8 +5,6 @@
ComfyUI
-
-
diff --git a/vite.config.mts b/vite.config.mts
index 50dd7c0f6..c46b9191e 100644
--- a/vite.config.mts
+++ b/vite.config.mts
@@ -234,6 +234,39 @@ export default defineConfig({
tailwindcss(),
typegpuPlugin({}),
comfyAPIPlugin(IS_DEV),
+ // Inject legacy user stylesheet links for desktop/localhost only
+ {
+ name: 'inject-user-stylesheet-links',
+ enforce: 'post',
+ transformIndexHtml(html) {
+ if (DISTRIBUTION === 'cloud') return html
+
+ return {
+ html,
+ tags: [
+ {
+ tag: 'link',
+ attrs: {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: 'user.css'
+ },
+ injectTo: 'head-prepend'
+ },
+ {
+ tag: 'link',
+ attrs: {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: 'api/userdata/user.css'
+ },
+ injectTo: 'head-prepend'
+ }
+ ]
+ }
+ }
+ },
+
// Twitter/Open Graph meta tags plugin (cloud distribution only)
{
name: 'inject-twitter-meta',