prithivMLmods commited on
Commit
178709b
Β·
verified Β·
1 Parent(s): a900616

update app

Browse files
Files changed (1) hide show
  1. app.py +473 -600
app.py CHANGED
@@ -355,571 +355,448 @@ def infer(
355
 
356
  css = r"""
357
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
358
-
359
  *{box-sizing:border-box;margin:0;padding:0}
360
-
361
- :root{
362
- --or: #FF4500;
363
- --or-dim: #CC3700;
364
- --or-bright:#FF6A33;
365
- --or-glow: rgba(255,69,0,.28);
366
- --or-soft: rgba(255,69,0,.12);
367
- --or-xsoft: rgba(255,69,0,.06);
368
- --bg: #0d0d0f;
369
- --bg1: #141416;
370
- --bg2: #1a1a1d;
371
- --bg3: #222226;
372
- --border: #2a2a2e;
373
- --border2: #333338;
374
- --text: #e8e8ec;
375
- --text2: #9898a8;
376
- --text3: #555560;
377
- --mono: 'JetBrains Mono', monospace;
378
- }
379
-
380
- html, body, .gradio-container {
381
- color-scheme: dark !important;
382
- background: #0d0d0f !important;
383
- }
384
-
385
- body, .gradio-container {
386
- font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
387
- font-size: 14px !important;
388
- color: #e8e8ec !important;
389
- min-height: 100vh;
390
- background: #0d0d0f !important;
391
- }
392
-
393
- footer { display: none !important; }
394
- .hidden-input { display:none!important;height:0!important;overflow:hidden!important;margin:0!important;padding:0!important; }
395
-
396
- #example-load-btn, #gradio-run-btn {
397
- position: absolute !important;
398
- left: -9999px !important;
399
- top: -9999px !important;
400
- width: 1px !important;
401
- height: 1px !important;
402
- opacity: .01 !important;
403
- pointer-events: none !important;
404
- overflow: hidden !important;
405
- }
406
-
407
- /* ── App shell ─────────────────────────────────────────────────────────────── */
408
- .app-shell {
409
- background: #141416 !important;
410
- border: 1px solid #2a2a2e !important;
411
- border-radius: 18px;
412
- margin: 12px auto;
413
- max-width: 1440px;
414
- overflow: hidden;
415
- box-shadow:
416
- 0 32px 64px -16px rgba(0,0,0,.8),
417
- 0 0 0 1px rgba(255,255,255,.03),
418
- 0 0 60px -20px rgba(255,69,0,.2);
419
- }
420
-
421
- /* ── Header ────────────────────────────────────────────────────────────────── */
422
- .app-header {
423
- background: #1a1a1d !important;
424
- border-bottom: 1px solid #2a2a2e !important;
425
- padding: 14px 24px;
426
- display: flex;
427
- align-items: center;
428
- justify-content: space-between;
429
- flex-wrap: wrap;
430
- gap: 12px;
431
- }
432
- .app-header-left { display:flex; align-items:center; gap:12px; }
433
- .app-logo {
434
- width: 38px; height: 38px;
435
- background: linear-gradient(135deg, #FF4500, #FF6A33);
436
- border-radius: 11px;
437
- display: flex; align-items: center; justify-content: center;
438
- box-shadow: 0 4px 14px rgba(255,69,0,.3);
439
- flex-shrink: 0;
440
- }
441
- .app-logo svg { width:22px; height:22px; fill:#fff; }
442
- .app-title {
443
- font-size: 18px; font-weight: 800; letter-spacing: -.4px;
444
- background: linear-gradient(135deg, #fff, #aaa);
445
- -webkit-background-clip: text;
446
- -webkit-text-fill-color: transparent;
447
- font-family: 'Inter', sans-serif;
448
- }
449
- .app-badge {
450
- font-size: 11px; font-weight: 700; padding: 3px 10px;
451
- border-radius: 20px; letter-spacing: .3px;
452
- background: rgba(255,69,0,.12);
453
- color: #FF6A33 !important;
454
- -webkit-text-fill-color: #FF6A33 !important;
455
- border: 1px solid rgba(255,69,0,.3);
456
- font-family: 'Inter', sans-serif;
457
- }
458
- .app-badge.fast {
459
- background: rgba(34,197,94,.1);
460
- color: #4ade80 !important;
461
- -webkit-text-fill-color: #4ade80 !important;
462
- border: 1px solid rgba(34,197,94,.25);
463
- }
464
-
465
- /* ── GitHub button - highlighted, always same in light & dark ────────────── */
466
- .gh-btn {
467
- display: inline-flex !important;
468
- align-items: center !important;
469
- gap: 7px !important;
470
- padding: 7px 14px !important;
471
- border-radius: 8px !important;
472
- text-decoration: none !important;
473
- font-family: 'Inter', sans-serif !important;
474
- font-size: 13px !important;
475
- font-weight: 700 !important;
476
- letter-spacing: .1px !important;
477
- /* Fixed colors - never change with theme */
478
- background: #FF4500 !important;
479
- color: #ffffff !important;
480
- -webkit-text-fill-color: #ffffff !important;
481
- border: 1px solid rgba(255,255,255,.15) !important;
482
- box-shadow:
483
- 0 2px 8px rgba(255,69,0,.4),
484
- 0 1px 0 rgba(255,255,255,.1) inset !important;
485
- transition: transform .15s ease, box-shadow .15s ease, background .15s ease !important;
486
- cursor: pointer !important;
487
- flex-shrink: 0 !important;
488
- }
489
- .gh-btn:hover {
490
- background: #FF6A33 !important;
491
- color: #ffffff !important;
492
- -webkit-text-fill-color: #ffffff !important;
493
- transform: translateY(-1px) !important;
494
- box-shadow:
495
- 0 4px 16px rgba(255,69,0,.55),
496
- 0 1px 0 rgba(255,255,255,.12) inset !important;
497
- }
498
- .gh-btn:active {
499
- background: #CC3700 !important;
500
- transform: translateY(0) !important;
501
- box-shadow: 0 1px 4px rgba(255,69,0,.3) !important;
502
- }
503
- .gh-btn svg {
504
- fill: #ffffff !important;
505
- flex-shrink: 0;
506
- width: 15px !important;
507
- height: 15px !important;
508
- }
509
- .gh-btn span {
510
- color: #ffffff !important;
511
- -webkit-text-fill-color: #ffffff !important;
512
- }
513
-
514
- /* Lock GitHub button against ANY browser/OS theme override */
515
- @media (prefers-color-scheme: light) {
516
- .gh-btn {
517
- background: #FF4500 !important;
518
- color: #ffffff !important;
519
- -webkit-text-fill-color: #ffffff !important;
520
- border-color: rgba(255,255,255,.15) !important;
521
- }
522
- .gh-btn:hover {
523
- background: #FF6A33 !important;
524
- color: #ffffff !important;
525
- -webkit-text-fill-color: #ffffff !important;
526
- }
527
- .gh-btn svg { fill: #ffffff !important; }
528
- .gh-btn span { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
529
- }
530
- @media (prefers-color-scheme: dark) {
531
- .gh-btn {
532
- background: #FF4500 !important;
533
- color: #ffffff !important;
534
- -webkit-text-fill-color: #ffffff !important;
535
- }
536
- .gh-btn:hover { background: #FF6A33 !important; }
537
- .gh-btn svg { fill: #ffffff !important; }
538
- .gh-btn span { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
539
- }
540
-
541
- /* ── Toolbar ───────────────────────────────────────────────────────────────── */
542
- .app-toolbar {
543
- background: #141416 !important;
544
- border-bottom: 1px solid #2a2a2e !important;
545
- padding: 7px 16px;
546
- display: flex; gap: 4px; align-items: center; flex-wrap: wrap;
547
- }
548
- .tb-sep { width:1px; height:28px; background:#2a2a2e; margin:0 8px; }
549
- .modern-tb-btn {
550
- display: inline-flex; align-items: center; justify-content: center; gap: 6px;
551
- min-width: 32px; height: 34px;
552
- background: transparent; border: 1px solid transparent;
553
- border-radius: 8px; cursor: pointer;
554
- font-size: 13px; font-weight: 700; padding: 0 12px;
555
- font-family: 'Inter', sans-serif;
556
- color: #ffffff !important;
557
- -webkit-text-fill-color: #ffffff !important;
558
- transition: all .15s ease;
559
- }
560
- .modern-tb-btn:hover { background: rgba(255,69,0,.12); border-color: rgba(255,69,0,.4); }
561
- .modern-tb-btn:active { background: rgba(255,69,0,.22); border-color: #FF4500; }
562
- .modern-tb-btn .tb-label { font-size:13px; color:#fff!important; -webkit-text-fill-color:#fff!important; font-weight:700; }
563
- .modern-tb-btn .tb-svg { width:15px; height:15px; flex-shrink:0; }
564
- .modern-tb-btn .tb-svg, .modern-tb-btn .tb-svg * { stroke:#fff!important; fill:none!important; }
565
- .tb-info { font-family:var(--mono); font-size:12px; color:#555560; padding:0 8px; display:flex; align-items:center; }
566
-
567
- @media (prefers-color-scheme: light) {
568
- .modern-tb-btn { color:#fff!important; -webkit-text-fill-color:#fff!important; }
569
- .modern-tb-btn .tb-label { color:#fff!important; -webkit-text-fill-color:#fff!important; }
570
- .modern-tb-btn .tb-svg, .modern-tb-btn .tb-svg * { stroke:#fff!important; }
571
- }
572
-
573
- /* ── Main layout ───────────────────────────────────────────────────────────── */
574
- .app-main-row { display:flex; gap:0; flex:1; overflow:hidden; }
575
- .app-main-left { flex:1; display:flex; flex-direction:column; min-width:0; border-right:1px solid #2a2a2e; }
576
- .app-main-right { width:440px; display:flex; flex-direction:column; flex-shrink:0; background:#141416!important; }
577
-
578
- /* ── Drop zone ─────────────────────────────────────────────────────────────── */
579
- #gallery-drop-zone { position:relative; background:#09090b!important; min-height:440px; overflow:auto; }
580
- #gallery-drop-zone.drag-over { outline:2px solid #FF4500; outline-offset:-2px; background:rgba(255,69,0,.05)!important; }
581
-
582
- .upload-prompt-modern { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:20; }
583
- .upload-click-area {
584
- display:flex; flex-direction:column; align-items:center; justify-content:center;
585
- cursor:pointer; padding:36px 52px; border:2px dashed #333338; border-radius:16px;
586
- background:rgba(255,69,0,.05); transition:all .2s ease; gap:8px;
587
- }
588
- .upload-click-area:hover { background:rgba(255,69,0,.1); border-color:#FF4500; transform:scale(1.03); }
589
- .upload-click-area:active { background:rgba(255,69,0,.15); transform:scale(.98); }
590
- .upload-click-area svg { width:80px; height:80px; }
591
- .upload-main-text { color:#9898a8; font-size:14px; font-weight:600; margin-top:4px; font-family:'Inter',sans-serif; }
592
- .upload-sub-text { color:#555560; font-size:12px; font-weight:400; text-align:center; max-width:280px; line-height:1.5; font-family:'Inter',sans-serif; }
593
-
594
- /* ── Gallery grid ──────────────────────────────────────────────��───────────── */
595
- .image-gallery-grid {
596
- display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
597
- gap:12px; padding:16px; align-content:start;
598
- }
599
- .gallery-thumb {
600
- position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden;
601
- cursor:pointer; border:2px solid #2a2a2e; transition:all .2s ease; background:#1a1a1d;
602
- }
603
- .gallery-thumb:hover { border-color:#333338; transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.4); }
604
- .gallery-thumb.selected { border-color:#FF4500!important; box-shadow:0 0 0 3px rgba(255,69,0,.25); }
605
- .gallery-thumb img { width:100%; height:100%; object-fit:cover; }
606
- .thumb-badge {
607
- position:absolute; top:6px; left:6px; background:#FF4500; color:#fff;
608
- padding:2px 8px; border-radius:4px; font-family:var(--mono); font-size:11px; font-weight:600;
609
- }
610
- .thumb-remove {
611
- position:absolute; top:6px; right:6px; width:24px; height:24px;
612
- background:rgba(0,0,0,.75); color:#fff; border:1px solid rgba(255,255,255,.15);
613
- border-radius:50%; cursor:pointer; display:none;
614
- align-items:center; justify-content:center; font-size:12px; transition:all .15s; line-height:1;
615
- }
616
- .gallery-thumb:hover .thumb-remove { display:flex; }
617
- .thumb-remove:hover { background:#FF4500; border-color:#FF4500; }
618
- .gallery-add-card {
619
- aspect-ratio:1; border-radius:10px; border:2px dashed #333338;
620
- display:flex; flex-direction:column; align-items:center; justify-content:center;
621
- cursor:pointer; transition:all .2s ease; background:rgba(255,69,0,.05); gap:4px;
622
- }
623
- .gallery-add-card:hover { border-color:#FF4500; background:rgba(255,69,0,.1); }
624
- .gallery-add-card .add-icon { font-size:28px; color:#555560; font-weight:300; }
625
- .gallery-add-card .add-text { font-size:12px; color:#555560; font-weight:600; font-family:'Inter',sans-serif; }
626
-
627
- /* ── Hint bar ──────────────────────────────────────────────────────────────── */
628
- .hint-bar {
629
- background: rgba(255,69,0,.05) !important;
630
- border-top:1px solid #2a2a2e; border-bottom:1px solid #2a2a2e;
631
- padding:10px 20px; font-size:13px; color:#9898a8; line-height:1.7;
632
- font-weight:400; font-family:'Inter',sans-serif;
633
- }
634
- .hint-bar b { color:#FF7A4D; font-weight:700; }
635
- .hint-bar kbd {
636
- display:inline-block; padding:1px 6px; background:#222226;
637
- border:1px solid #333338; border-radius:4px;
638
- font-family:var(--mono); font-size:11px; color:#9898a8;
639
- }
640
-
641
- /* ── Suggestions ───────────────────────────────────────────────────────────── */
642
- .suggestions-section { border-top:1px solid #2a2a2e; padding:12px 16px; background:#141416!important; }
643
- .suggestions-title, .examples-title {
644
- font-size:11px; font-weight:700; color:#555560;
645
- text-transform:uppercase; letter-spacing:1px; margin-bottom:10px;
646
- font-family:'Inter',sans-serif;
647
- }
648
- .suggestions-wrap { display:flex; flex-wrap:wrap; gap:6px; }
649
- .suggestion-chip {
650
- display:inline-flex; align-items:center; gap:4px; padding:5px 13px;
651
- background:rgba(255,69,0,.1); border:1px solid rgba(255,69,0,.25); border-radius:20px;
652
- color:#FF7A4D; font-size:12px; font-weight:600; font-family:'Inter',sans-serif;
653
- cursor:pointer; transition:all .15s; white-space:nowrap;
654
- }
655
- .suggestion-chip:hover { background:rgba(255,69,0,.2); border-color:#FF4500; color:#fff; transform:translateY(-1px); }
656
-
657
- /* ── Examples ──────────────────────────────────────────────────────────────── */
658
- .examples-section { border-top:1px solid #2a2a2e; padding:14px 16px 18px; background:#141416!important; }
659
- .examples-scroll { display:flex; gap:10px; overflow-x:auto; padding-bottom:10px; padding-top:2px; }
660
- .examples-scroll::-webkit-scrollbar { height:5px; }
661
- .examples-scroll::-webkit-scrollbar-track { background:#0d0d0f; border-radius:3px; }
662
- .examples-scroll::-webkit-scrollbar-thumb { background:#333338; border-radius:3px; }
663
- .examples-scroll::-webkit-scrollbar-thumb:hover { background:#CC3700; }
664
- .example-card {
665
- flex-shrink:0; width:220px; background:#1a1a1d!important; border:1px solid #2a2a2e;
666
- border-radius:12px; overflow:hidden; cursor:pointer; transition:all .2s ease;
667
- }
668
- .example-card:hover { border-color:#FF4500; transform:translateY(-3px); box-shadow:0 6px 20px rgba(255,69,0,.22); }
669
- .example-card.loading { opacity:.5; pointer-events:none; }
670
- .example-thumbs { display:flex; height:115px; overflow:hidden; background:#222226!important; }
671
- .example-thumbs img { flex:1; object-fit:cover; min-width:0; }
672
- .example-thumb-placeholder {
673
- flex:1; display:flex; align-items:center; justify-content:center;
674
- background:#222226!important; color:#555560; font-size:11px; min-width:0;
675
- }
676
- .example-meta { padding:7px 10px 3px; display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
677
- .example-badge {
678
- display:inline-flex; padding:2px 7px; background:rgba(255,69,0,.1); border-radius:4px;
679
- font-size:10px; font-weight:700; color:#FF6A33; font-family:var(--mono);
680
- white-space:nowrap; border:1px solid rgba(255,69,0,.2);
681
- }
682
- .example-lora-badge {
683
- display:inline-flex; padding:2px 7px; background:rgba(255,255,255,.06); border-radius:4px;
684
- font-size:10px; font-weight:600; color:#9898a8; font-family:var(--mono);
685
- white-space:nowrap; border:1px solid #2a2a2e;
686
- max-width:120px; overflow:hidden; text-overflow:ellipsis;
687
- }
688
- .example-prompt-text {
689
- padding:2px 10px 10px; font-size:11.5px; color:#9898a8; line-height:1.45;
690
- display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
691
- overflow:hidden; font-weight:400; font-family:'Inter',sans-serif;
692
- }
693
-
694
- /* ── Right panel ───────────────────────────────────────────────────────────── */
695
- .panel-card { border-bottom:1px solid #2a2a2e; background:#141416!important; }
696
- .panel-card-title {
697
- padding:11px 20px; font-size:11px; font-weight:700; color:#555560;
698
- text-transform:uppercase; letter-spacing:1px;
699
- border-bottom:1px solid rgba(42,42,46,.6);
700
- background:#141416!important; font-family:'Inter',sans-serif;
701
- }
702
- .panel-card-body { padding:14px 18px; display:flex; flex-direction:column; gap:8px; background:#141416!important; }
703
- .modern-label { font-size:13px; font-weight:600; color:#9898a8; margin-bottom:4px; display:block; font-family:'Inter',sans-serif; }
704
- .modern-textarea {
705
- width:100%; background:#09090b!important; border:1px solid #2a2a2e; border-radius:8px;
706
- padding:10px 14px; font-family:'Inter',sans-serif; font-size:14px;
707
- color:#e8e8ec!important; -webkit-text-fill-color:#e8e8ec!important;
708
- resize:vertical; outline:none; min-height:44px; transition:border-color .2s; font-weight:400;
709
- }
710
- .modern-textarea:focus { border-color:#FF4500; box-shadow:0 0 0 3px rgba(255,69,0,.22); }
711
- .modern-textarea::placeholder { color:#555560!important; -webkit-text-fill-color:#555560!important; }
712
- .modern-textarea.error-flash {
713
- border-color:#ef4444!important;
714
- box-shadow:0 0 0 3px rgba(239,68,68,.2)!important;
715
- animation:shake .4s ease;
716
- }
717
- @keyframes shake {
718
- 0%,100%{transform:translateX(0)}
719
- 20%,60%{transform:translateX(-4px)}
720
- 40%,80%{transform:translateX(4px)}
721
- }
722
-
723
- /* ── LoRA selector - always dark ───────────────────────────────────────────── */
724
- .lora-selector-card { border-bottom:1px solid #2a2a2e!important; background:#0d0d0f!important; }
725
- .lora-selector-body { padding:12px 18px!important; background:#0d0d0f!important; }
726
- .lora-select-label {
727
- font-size:11px!important; font-weight:700!important;
728
- color:#555560!important; -webkit-text-fill-color:#555560!important;
729
- text-transform:uppercase!important; letter-spacing:1px!important;
730
- margin-bottom:8px!important; display:flex!important; align-items:center!important;
731
- gap:6px!important; font-family:'Inter',sans-serif!important;
732
- }
733
- .lora-select-label::before {
734
- content:''; display:inline-block; width:8px; height:8px;
735
- background:#FF4500; border-radius:50%; flex-shrink:0;
736
- }
737
- .lora-native-select {
738
- width:100%!important; background:#09090b!important;
739
- border:1px solid #333338!important; border-radius:8px!important;
740
  padding:9px 36px 9px 14px!important;
741
  font-family:'Inter',sans-serif!important;
742
- font-size:13px!important; font-weight:600!important;
743
- color:#e8e8ec!important; -webkit-text-fill-color:#e8e8ec!important;
744
- outline:none!important; appearance:none!important; -webkit-appearance:none!important;
745
- background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FF4500' d='M6 8L1 3h10z'/%3E%3C/svg%3E")!important;
746
- background-repeat:no-repeat!important; background-position:right 12px center!important;
747
- cursor:pointer!important; transition:border-color .2s!important; color-scheme:dark!important;
748
- }
749
- .lora-native-select:focus { border-color:#FF4500!important; box-shadow:0 0 0 3px rgba(255,69,0,.22)!important; }
750
- .lora-native-select option { background:#1a1a1d!important; color:#e8e8ec!important; }
751
-
752
- @media (prefers-color-scheme: light) {
753
- .lora-selector-card { background:#0d0d0f!important; }
754
- .lora-selector-body { background:#0d0d0f!important; }
755
- .lora-select-label { color:#555560!important; -webkit-text-fill-color:#555560!important; }
756
- .lora-native-select {
757
- background:#09090b!important; color:#e8e8ec!important;
758
- -webkit-text-fill-color:#e8e8ec!important;
759
- border-color:#333338!important; color-scheme:dark!important;
760
  }
761
- .lora-native-select option { background:#1a1a1d!important; color:#e8e8ec!important; }
762
  }
763
 
764
- /* ── Toast ──��──────────────────────────────────────────────────────────────── */
765
- .toast-notification {
766
- position:fixed; top:24px; left:50%;
767
- transform:translateX(-50%) translateY(-120%);
768
- z-index:9999; padding:10px 24px; border-radius:10px;
769
- font-family:'Inter',sans-serif; font-size:14px; font-weight:700;
770
- display:flex; align-items:center; gap:8px;
771
  box-shadow:0 8px 24px rgba(0,0,0,.5);
772
- transition:transform .35s cubic-bezier(.34,1.56,.64,1),opacity .35s ease;
773
- opacity:0; pointer-events:none;
774
- }
775
- .toast-notification.visible { transform:translateX(-50%) translateY(0); opacity:1; pointer-events:auto; }
776
- .toast-notification.error { background:linear-gradient(135deg,#dc2626,#b91c1c); color:#fff; border:1px solid rgba(255,255,255,.15); }
777
- .toast-notification.warning { background:linear-gradient(135deg,#FF4500,#CC3700); color:#fff; border:1px solid rgba(255,255,255,.15); }
778
- .toast-notification.info { background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; border:1px solid rgba(255,255,255,.15); }
779
-
780
- /* ── Run button ────────────────────────────────────────────────────────────── */
781
- .btn-run {
782
- display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
783
- background:linear-gradient(135deg,#FF4500,#CC3700); border:none; border-radius:10px;
784
- padding:13px 24px; cursor:pointer; font-size:15px; font-weight:800;
785
- font-family:'Inter',sans-serif;
786
- color:#fff!important; -webkit-text-fill-color:#fff!important;
787
- transition:all .2s ease; letter-spacing:.2px;
788
- box-shadow:0 4px 20px rgba(255,69,0,.28),inset 0 1px 0 rgba(255,255,255,.12);
789
- }
790
- .btn-run:hover {
791
- background:linear-gradient(135deg,#FF6A33,#FF4500); transform:translateY(-1px);
792
- box-shadow:0 8px 28px rgba(255,69,0,.45),inset 0 1px 0 rgba(255,255,255,.15);
793
- }
794
- .btn-run:active { transform:translateY(0); box-shadow:0 2px 10px rgba(255,69,0,.28); }
795
- .btn-run svg { width:18px; height:18px; fill:#fff!important; }
796
- #custom-run-btn, #custom-run-btn *, #run-btn-label, .btn-run, .btn-run * {
797
- color:#fff!important; -webkit-text-fill-color:#fff!important; fill:#fff!important;
798
- }
799
-
800
- /* ── Output ────────────────────────────────────────────────────────────────── */
801
- .output-frame { border-bottom:1px solid #2a2a2e; display:flex; flex-direction:column; position:relative; }
802
- .out-title {
803
- padding:10px 20px; font-size:11px; font-weight:700;
804
- color:#fff!important; -webkit-text-fill-color:#fff!important;
805
- text-transform:uppercase; letter-spacing:1px;
806
- border-bottom:1px solid rgba(42,42,46,.6);
807
- display:flex; align-items:center; justify-content:space-between;
808
- background:#141416!important; font-family:'Inter',sans-serif;
809
- }
810
- .out-body {
811
- flex:1; background:#09090b!important;
812
- display:flex; align-items:center; justify-content:center;
813
- overflow:hidden; min-height:240px; position:relative;
814
- }
815
- .out-body img { max-width:100%; max-height:460px; image-rendering:auto; }
816
- .out-placeholder { color:#555560; font-size:13px; text-align:center; padding:20px; font-weight:500; font-family:'Inter',sans-serif; }
817
- .out-download-btn {
818
- display:none; align-items:center; justify-content:center;
819
- background:rgba(255,69,0,.12); border:1px solid rgba(255,69,0,.28); border-radius:6px;
820
- cursor:pointer; padding:3px 10px; font-size:11px; font-weight:700;
821
- color:#FF6A33!important; -webkit-text-fill-color:#FF6A33!important;
822
- gap:4px; height:24px; transition:all .15s; font-family:'Inter',sans-serif;
823
- }
824
- .out-download-btn:hover {
825
- background:#FF4500; border-color:#FF4500;
826
- color:#fff!important; -webkit-text-fill-color:#fff!important;
827
- }
828
- .out-download-btn.visible { display:inline-flex; }
829
- .out-download-btn svg { width:12px; height:12px; fill:#FF6A33; }
830
- .out-download-btn:hover svg { fill:#fff; }
831
-
832
- /* ── Loader ────────────────────────────────────────────────────────────────── */
833
- .modern-loader {
834
- display:none; position:absolute; top:0; left:0; right:0; bottom:0;
835
- background:rgba(9,9,11,.93); z-index:15;
836
- flex-direction:column; align-items:center; justify-content:center;
837
- gap:16px; backdrop-filter:blur(4px);
838
- }
839
- .modern-loader.active { display:flex; }
840
- .modern-loader .loader-spinner {
841
- width:36px; height:36px; border:3px solid #2a2a2e;
842
- border-top-color:#FF4500; border-radius:50%; animation:spin .8s linear infinite;
843
- }
844
- @keyframes spin { to{transform:rotate(360deg)} }
845
- .modern-loader .loader-text { font-size:13px; color:#9898a8; font-weight:600; font-family:'Inter',sans-serif; }
846
- .loader-bar-track { width:200px; height:4px; background:#2a2a2e; border-radius:2px; overflow:hidden; }
847
- .loader-bar-fill {
848
- height:100%; background:linear-gradient(90deg,#FF4500,#FF6A33,#FF4500);
849
- background-size:200% 100%; animation:shimmer 1.5s ease-in-out infinite; border-radius:2px;
850
- }
851
- @keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
852
-
853
- /* ── Settings ──────────────────────────────────────────────────────────────── */
854
- .settings-group { border:1px solid #2a2a2e; border-radius:10px; margin:12px 16px; padding:0; overflow:hidden; background:#141416!important; }
855
- .settings-group-title {
856
- font-size:11px; font-weight:700; color:#555560; text-transform:uppercase; letter-spacing:1px;
857
- padding:9px 16px; border-bottom:1px solid #2a2a2e;
858
- background:rgba(26,26,29,.5)!important; font-family:'Inter',sans-serif;
859
- }
860
- .settings-group-body { padding:14px 16px; display:flex; flex-direction:column; gap:12px; background:#141416!important; }
861
- .slider-row { display:flex; align-items:center; gap:10px; min-height:28px; }
862
- .slider-row label { font-size:13px; font-weight:600; color:#9898a8; min-width:72px; flex-shrink:0; font-family:'Inter',sans-serif; }
863
- .slider-row input[type="range"] {
864
- flex:1; -webkit-appearance:none; appearance:none;
865
- height:5px; background:#333338; border-radius:3px; outline:none; min-width:0;
866
- }
867
- .slider-row input[type="range"]::-webkit-slider-thumb {
868
- -webkit-appearance:none; width:16px; height:16px;
869
- background:linear-gradient(135deg,#FF4500,#CC3700);
870
- border-radius:50%; cursor:pointer;
871
- box-shadow:0 2px 6px rgba(255,69,0,.28); transition:transform .15s;
872
- }
873
- .slider-row input[type="range"]::-webkit-slider-thumb:hover { transform:scale(1.2); }
874
- .slider-row input[type="range"]::-moz-range-thumb {
875
- width:16px; height:16px; background:linear-gradient(135deg,#FF4500,#CC3700);
876
- border-radius:50%; cursor:pointer; border:none; box-shadow:0 2px 6px rgba(255,69,0,.28);
877
- }
878
- .slider-row .slider-val {
879
- min-width:52px; text-align:right; font-family:var(--mono); font-size:12px;
880
- font-weight:500; padding:3px 8px; background:#09090b; border:1px solid #2a2a2e;
881
- border-radius:6px; color:#9898a8; flex-shrink:0;
882
- }
883
- .checkbox-row { display:flex; align-items:center; gap:8px; font-size:13px; color:#9898a8; }
884
- .checkbox-row input[type="checkbox"] { accent-color:#FF4500; width:16px; height:16px; cursor:pointer; }
885
- .checkbox-row label { color:#9898a8; font-size:13px; cursor:pointer; font-weight:500; font-family:'Inter',sans-serif; }
886
-
887
- /* ── Status bar ────────────────────────────────────────────────────────────── */
888
- .app-statusbar {
889
- background:#141416!important; border-top:1px solid #2a2a2e;
890
- padding:6px 20px; display:flex; gap:12px; height:34px; align-items:center; font-size:12px;
891
- }
892
- .app-statusbar .sb-section {
893
- padding:0 12px; flex:1; display:flex; align-items:center;
894
- font-family:var(--mono); font-size:12px; color:#555560;
895
- overflow:hidden; white-space:nowrap;
896
- }
897
- .app-statusbar .sb-section.sb-fixed {
898
- flex:0 0 auto; min-width:90px; text-align:center; justify-content:center;
899
- padding:3px 12px; background:rgba(255,69,0,.1); border-radius:6px;
900
- color:#FF6A33; font-weight:700; border:1px solid rgba(255,69,0,.2);
901
- }
902
-
903
- /* ── Footer ────────────────────────────────────────────────────────────────── */
904
- .exp-note {
905
- padding:10px 20px; font-size:12px; color:#555560;
906
- border-top:1px solid #2a2a2e; text-align:center; font-weight:500;
907
- background:#141416!important; font-family:'Inter',sans-serif;
908
- }
909
- .exp-note a { color:#FF6A33!important; -webkit-text-fill-color:#FF6A33!important; text-decoration:none; }
910
- .exp-note a:hover { text-decoration:underline; color:#fff!important; -webkit-text-fill-color:#fff!important; }
911
-
912
- /* ── Scrollbars ────────────────────────────────────────────────────────────── */
913
- ::-webkit-scrollbar { width:7px; height:7px; }
914
- ::-webkit-scrollbar-track { background:#09090b; }
915
- ::-webkit-scrollbar-thumb { background:#333338; border-radius:4px; }
916
- ::-webkit-scrollbar-thumb:hover { background:#CC3700; }
917
-
918
- /* ── Responsive ────────────────────────────────────────────────────────────── */
 
 
 
919
  @media(max-width:860px){
920
- .app-main-row { flex-direction:column; }
921
- .app-main-right { width:100%; }
922
- .app-main-left { border-right:none; border-bottom:1px solid #2a2a2e; }
923
  }
924
  """
925
 
@@ -950,34 +827,32 @@ function init() {
950
  let selectedIdx = -1;
951
  let toastTimer = null;
952
 
953
- /* ── Force dark styles on elements that browsers may override ── */
954
  function enforceDarkStyles() {
955
- /* LoRA card */
956
  const loraCard = document.querySelector('.lora-selector-card');
957
  const loraBody = document.querySelector('.lora-selector-body');
958
  const loraLabel = document.querySelector('.lora-select-label');
959
  const loraEl = document.getElementById('custom-lora-select');
960
- if (loraCard) { loraCard.style.setProperty('background','#0d0d0f','important'); }
961
- if (loraBody) { loraBody.style.setProperty('background','#0d0d0f','important'); }
962
  if (loraLabel) {
963
- loraLabel.style.setProperty('color','#555560','important');
964
- loraLabel.style.setProperty('-webkit-text-fill-color','#555560','important');
965
  }
966
  if (loraEl) {
967
  loraEl.style.setProperty('background-color','#09090b','important');
968
- loraEl.style.setProperty('color','#e8e8ec','important');
969
- loraEl.style.setProperty('-webkit-text-fill-color','#e8e8ec','important');
970
- loraEl.style.setProperty('border-color','#333338','important');
971
  }
972
 
973
- /* GitHub button */
974
  const ghBtn = document.querySelector('.gh-btn');
975
  if (ghBtn) {
976
- ghBtn.style.setProperty('background','#FF4500','important');
977
  ghBtn.style.setProperty('color','#ffffff','important');
978
  ghBtn.style.setProperty('-webkit-text-fill-color','#ffffff','important');
979
- ghBtn.style.setProperty('border-color','rgba(255,255,255,.15)','important');
980
- ghBtn.style.setProperty('box-shadow','0 2px 8px rgba(255,69,0,.4)','important');
981
  const svg = ghBtn.querySelector('svg');
982
  if (svg) svg.style.setProperty('fill','#ffffff','important');
983
  const span = ghBtn.querySelector('span');
@@ -987,41 +862,39 @@ function init() {
987
  }
988
  }
989
 
990
- /* Shell sections */
991
  const shell = document.querySelector('.app-shell');
992
  const header = document.querySelector('.app-header');
993
  const toolbar = document.querySelector('.app-toolbar');
994
- if (shell) shell.style.setProperty('background','#141416','important');
995
- if (header) header.style.setProperty('background','#1a1a1d','important');
996
- if (toolbar) toolbar.style.setProperty('background','#141416','important');
997
  }
998
 
999
  enforceDarkStyles();
1000
- setInterval(enforceDarkStyles, 800);
1001
 
1002
- /* GitHub button hover interaction */
1003
  const ghBtn = document.querySelector('.gh-btn');
1004
  if (ghBtn) {
1005
  ghBtn.addEventListener('mouseenter', () => {
1006
- ghBtn.style.setProperty('background','#FF6A33','important');
1007
  ghBtn.style.setProperty('color','#ffffff','important');
1008
  ghBtn.style.setProperty('-webkit-text-fill-color','#ffffff','important');
1009
  ghBtn.style.setProperty('transform','translateY(-1px)','important');
1010
- ghBtn.style.setProperty('box-shadow','0 4px 16px rgba(255,69,0,.55)','important');
1011
  });
1012
  ghBtn.addEventListener('mouseleave', () => {
1013
- ghBtn.style.setProperty('background','#FF4500','important');
1014
  ghBtn.style.setProperty('color','#ffffff','important');
1015
  ghBtn.style.setProperty('-webkit-text-fill-color','#ffffff','important');
1016
  ghBtn.style.setProperty('transform','translateY(0)','important');
1017
- ghBtn.style.setProperty('box-shadow','0 2px 8px rgba(255,69,0,.4)','important');
1018
  });
1019
  ghBtn.addEventListener('mousedown', () => {
1020
- ghBtn.style.setProperty('background','#CC3700','important');
1021
  ghBtn.style.setProperty('transform','translateY(0)','important');
1022
  });
1023
  ghBtn.addEventListener('mouseup', () => {
1024
- ghBtn.style.setProperty('background','#FF6A33','important');
1025
  });
1026
  }
1027
 
@@ -1377,23 +1250,25 @@ watchExampleResults();
1377
  }
1378
  """
1379
 
1380
- ROCKET_LOGO_SVG = '''<svg viewBox="0 0 24 24" fill="white" xmlns="http://www.w3.org/2000/svg">
1381
- <path d="M12 2C12 2 7 6.5 7 13c0 1.4.3 2.7.8 3.9L5 19.7l1.4 1.4 2.8-2.8c1.2.5 2.5.7 3.8.7s2.6-.2 3.8-.7l2.8 2.8 1.4-1.4-2.8-2.8c.5-1.2.8-2.5.8-3.9 0-6.5-5-11-5-11z"/>
1382
- <circle cx="12" cy="13" r="2"/>
1383
- <path d="M9 21c0 1.1.9 2 2 2h2c1.1 0 2-.9 2-2v-1H9v1z"/>
1384
- </svg>'''
 
 
 
 
 
1385
 
1386
- UPLOAD_SVG = '<svg class="tb-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>'
1387
- REMOVE_SVG = '<svg class="tb-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>'
1388
- CLEAR_SVG = '<svg class="tb-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>'
1389
- DOWNLOAD_SVG = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 16l-5-5h3V4h4v7h3l-5 5z" fill="currentColor"/><path d="M20 18H4v2h16v-2z" fill="currentColor"/></svg>'
1390
- GITHUB_SVG = '<svg width="15" height="15" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>'
1391
 
1392
  LORA_OPTIONS_HTML = "\n".join(
1393
  f'<option value="{html_lib.escape(name)}">{html_lib.escape(name)}</option>'
1394
  for name in ADAPTER_NAMES
1395
  )
1396
 
 
1397
  with gr.Blocks() as demo:
1398
 
1399
  hidden_images_b64 = gr.Textbox(value="[]", elem_id="hidden-images-b64", elem_classes="hidden-input", container=False)
@@ -1415,13 +1290,12 @@ with gr.Blocks() as demo:
1415
  <!-- Header -->
1416
  <div class="app-header">
1417
  <div class="app-header-left">
1418
- <div class="app-logo">{ROCKET_LOGO_SVG}</div>
1419
  <span class="app-title">Qwen-Image-Edit</span>
1420
  <span class="app-badge">2511</span>
1421
  <span class="app-badge fast">4-Step Fast</span>
1422
  </div>
1423
 
1424
- <!-- GitHub button: highlighted orange, same in light & dark -->
1425
  <a href="https://github.com/PRITHIVSAKTHIUR/Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load"
1426
  target="_blank"
1427
  class="gh-btn">
@@ -1456,11 +1330,11 @@ with gr.Blocks() as demo:
1456
  <div id="upload-click-area" class="upload-click-area">
1457
  <svg viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
1458
  <rect x="8" y="14" width="64" height="52" rx="6" fill="none"
1459
- stroke="#FF4500" stroke-width="2" stroke-dasharray="4 3"/>
1460
  <polygon points="12,62 30,40 42,50 54,34 68,62"
1461
- fill="rgba(255,69,0,0.12)" stroke="#FF4500" stroke-width="1.5"/>
1462
  <circle cx="28" cy="30" r="6"
1463
- fill="rgba(255,69,0,0.18)" stroke="#FF4500" stroke-width="1.5"/>
1464
  </svg>
1465
  <span class="upload-main-text">Click or drag images here</span>
1466
  <span class="upload-sub-text">Supports multiple images for reference-based editing and guided manipulation</span>
@@ -1531,9 +1405,8 @@ with gr.Blocks() as demo:
1531
 
1532
  <div style="padding:14px 18px 6px;">
1533
  <button id="custom-run-btn" class="btn-run">
1534
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
1535
- <path d="M12 2C12 2 7 6.5 7 13c0 1.4.3 2.7.8 3.9L5 19.7l1.4 1.4 2.8-2.8c1.2.5 2.5.7 3.8.7s2.6-.2 3.8-.7l2.8 2.8 1.4-1.4-2.8-2.8c.5-1.2.8-2.5.8-3.9 0-6.5-5-11-5-11z"/>
1536
- <circle cx="12" cy="13" r="2"/>
1537
  </svg>
1538
  <span id="run-btn-label">Edit Image</span>
1539
  </button>
 
355
 
356
  css = r"""
357
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
 
358
  *{box-sizing:border-box;margin:0;padding:0}
359
+ body,.gradio-container{
360
+ background:#0f0f13!important;font-family:'Inter',system-ui,-apple-system,sans-serif!important;
361
+ font-size:14px!important;color:#e4e4e7!important;min-height:100vh;
362
+ }
363
+ .dark body,.dark .gradio-container{background:#0f0f13!important;color:#e4e4e7!important}
364
+ footer{display:none!important}
365
+ .hidden-input{display:none!important;height:0!important;overflow:hidden!important;margin:0!important;padding:0!important}
366
+
367
+ #example-load-btn{
368
+ position:absolute!important;left:-9999px!important;top:-9999px!important;
369
+ width:1px!important;height:1px!important;opacity:0.01!important;
370
+ pointer-events:none!important;overflow:hidden!important;
371
+ }
372
+ #gradio-run-btn{
373
+ position:absolute;left:-9999px;top:-9999px;width:1px;height:1px;
374
+ opacity:0.01;pointer-events:none;overflow:hidden;
375
+ }
376
+
377
+ /* ── App shell ── */
378
+ .app-shell{
379
+ background:#18181b;border:1px solid #27272a;border-radius:16px;
380
+ margin:12px auto;max-width:1440px;overflow:hidden;
381
+ box-shadow:0 25px 50px -12px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.03);
382
+ }
383
+
384
+ /* ── Header ── */
385
+ .app-header{
386
+ background:linear-gradient(135deg,#18181b,#1e1e24);border-bottom:1px solid #27272a;
387
+ padding:14px 24px;display:flex;align-items:center;justify-content:space-between;
388
+ flex-wrap:wrap;gap:12px;
389
+ }
390
+ .app-header-left{display:flex;align-items:center;gap:12px}
391
+ .app-logo{
392
+ width:38px;height:38px;background:linear-gradient(135deg,#1E90FF,#47A3FF,#7CB8FF);
393
+ border-radius:11px;display:flex;align-items:center;justify-content:center;
394
+ box-shadow:0 4px 12px rgba(30,144,255,.35);flex-shrink:0;
395
+ }
396
+ .app-logo svg{width:20px;height:20px;fill:#fff;flex-shrink:0}
397
+ .app-title{
398
+ font-size:18px;font-weight:800;background:linear-gradient(135deg,#e4e4e7,#a1a1aa);
399
+ -webkit-background-clip:text;-webkit-text-fill-color:transparent;letter-spacing:-.3px;
400
+ }
401
+ .app-badge{
402
+ font-size:11px;font-weight:700;padding:3px 10px;border-radius:20px;
403
+ background:rgba(30,144,255,.15);color:#47A3FF;border:1px solid rgba(30,144,255,.25);letter-spacing:.3px;
404
+ }
405
+ .app-badge.fast{background:rgba(34,197,94,.12);color:#4ade80;border:1px solid rgba(34,197,94,.25)}
406
+
407
+ /* ── GitHub button ── */
408
+ .gh-btn{
409
+ display:inline-flex!important;align-items:center!important;gap:7px!important;
410
+ padding:7px 16px!important;border-radius:8px!important;text-decoration:none!important;
411
+ font-family:'Inter',sans-serif!important;font-size:13px!important;font-weight:700!important;
412
+ letter-spacing:.1px!important;background:#1E90FF!important;
413
+ color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;
414
+ border:1px solid rgba(255,255,255,.18)!important;
415
+ box-shadow:0 2px 10px rgba(30,144,255,.45),0 1px 0 rgba(255,255,255,.1) inset!important;
416
+ transition:transform .15s ease,box-shadow .15s ease,background .15s ease!important;
417
+ cursor:pointer!important;flex-shrink:0!important;
418
+ }
419
+ .gh-btn:hover{
420
+ background:#47A3FF!important;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;
421
+ transform:translateY(-1px)!important;
422
+ box-shadow:0 5px 18px rgba(30,144,255,.6),0 1px 0 rgba(255,255,255,.12) inset!important;
423
+ }
424
+ .gh-btn:active{
425
+ background:#1873CC!important;transform:translateY(0)!important;
426
+ box-shadow:0 1px 5px rgba(30,144,255,.35)!important;
427
+ }
428
+ .gh-btn svg{fill:#ffffff!important;flex-shrink:0;width:15px!important;height:15px!important}
429
+ .gh-btn span{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important}
430
+
431
+ @media (prefers-color-scheme: light){
432
+ .gh-btn{background:#1E90FF!important;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;border-color:rgba(255,255,255,.18)!important}
433
+ .gh-btn:hover{background:#47A3FF!important}
434
+ .gh-btn svg{fill:#ffffff!important}
435
+ .gh-btn span{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important}
436
+ }
437
+
438
+ /* ── Toolbar ── */
439
+ .app-toolbar{
440
+ background:#18181b;border-bottom:1px solid #27272a;padding:8px 16px;
441
+ display:flex;gap:4px;align-items:center;flex-wrap:wrap;
442
+ }
443
+ .tb-sep{width:1px;height:28px;background:#27272a;margin:0 8px}
444
+ .modern-tb-btn{
445
+ display:inline-flex;align-items:center;justify-content:center;gap:6px;
446
+ min-width:32px;height:34px;background:transparent;border:1px solid transparent;
447
+ border-radius:8px;cursor:pointer;font-size:13px;font-weight:600;padding:0 12px;
448
+ font-family:'Inter',sans-serif;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;
449
+ transition:all .15s ease;
450
+ }
451
+ .modern-tb-btn:hover{background:rgba(30,144,255,.15);border-color:rgba(30,144,255,.3)}
452
+ .modern-tb-btn:active,.modern-tb-btn.active{background:rgba(30,144,255,.25);border-color:rgba(30,144,255,.45)}
453
+ .modern-tb-btn .tb-label{font-size:13px;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;font-weight:600}
454
+ .modern-tb-btn .tb-svg{width:15px;height:15px;flex-shrink:0;color:#ffffff!important}
455
+ .modern-tb-btn .tb-svg,
456
+ .modern-tb-btn .tb-svg *{stroke:#ffffff!important;fill:none!important}
457
+ .tb-info{font-family:'JetBrains Mono',monospace;font-size:12px;color:#71717a;padding:0 8px;display:flex;align-items:center}
458
+
459
+ body:not(.dark) .modern-tb-btn,body:not(.dark) .modern-tb-btn *{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important}
460
+ body:not(.dark) .modern-tb-btn .tb-svg,body:not(.dark) .modern-tb-btn .tb-svg *{stroke:#ffffff!important}
461
+ .dark .modern-tb-btn,.dark .modern-tb-btn *{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important}
462
+ .dark .modern-tb-btn .tb-svg,.dark .modern-tb-btn .tb-svg *{stroke:#ffffff!important}
463
+ .gradio-container .modern-tb-btn,.gradio-container .modern-tb-btn *{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important}
464
+ .gradio-container .modern-tb-btn .tb-svg,.gradio-container .modern-tb-btn .tb-svg *{stroke:#ffffff!important}
465
+
466
+ /* ── Main layout ── */
467
+ .app-main-row{display:flex;gap:0;flex:1;overflow:hidden}
468
+ .app-main-left{flex:1;display:flex;flex-direction:column;min-width:0;border-right:1px solid #27272a}
469
+ .app-main-right{width:440px;display:flex;flex-direction:column;flex-shrink:0;background:#18181b}
470
+
471
+ /* ── Drop zone ── */
472
+ #gallery-drop-zone{position:relative;background:#09090b;min-height:440px;overflow:auto}
473
+ #gallery-drop-zone.drag-over{outline:2px solid #1E90FF;outline-offset:-2px;background:rgba(30,144,255,.04)}
474
+
475
+ .upload-prompt-modern{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:20}
476
+ .upload-click-area{
477
+ display:flex;flex-direction:column;align-items:center;justify-content:center;
478
+ cursor:pointer;padding:36px 52px;border:2px dashed #3f3f46;border-radius:16px;
479
+ background:rgba(30,144,255,.03);transition:all .2s ease;gap:8px;
480
+ }
481
+ .upload-click-area:hover{background:rgba(30,144,255,.08);border-color:#1E90FF;transform:scale(1.03)}
482
+ .upload-click-area:active{background:rgba(30,144,255,.12);transform:scale(.98)}
483
+ .upload-click-area svg{width:80px;height:80px}
484
+ .upload-main-text{color:#71717a;font-size:14px;font-weight:500;margin-top:4px}
485
+ .upload-sub-text{color:#52525b;font-size:12px;text-align:center;max-width:280px;line-height:1.5}
486
+
487
+ /* ── Gallery grid ── */
488
+ .image-gallery-grid{
489
+ display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
490
+ gap:12px;padding:16px;align-content:start;
491
+ }
492
+ .gallery-thumb{
493
+ position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;
494
+ cursor:pointer;border:2px solid #27272a;transition:all .2s ease;background:#18181b;
495
+ }
496
+ .gallery-thumb:hover{border-color:#3f3f46;transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.4)}
497
+ .gallery-thumb.selected{border-color:#1E90FF!important;box-shadow:0 0 0 3px rgba(30,144,255,.2)}
498
+ .gallery-thumb img{width:100%;height:100%;object-fit:cover}
499
+ .thumb-badge{
500
+ position:absolute;top:6px;left:6px;background:#1E90FF;color:#fff;
501
+ padding:2px 8px;border-radius:4px;font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:600;
502
+ }
503
+ .thumb-remove{
504
+ position:absolute;top:6px;right:6px;width:24px;height:24px;background:rgba(0,0,0,.75);
505
+ color:#fff;border:1px solid rgba(255,255,255,.15);border-radius:50%;cursor:pointer;
506
+ display:none;align-items:center;justify-content:center;font-size:12px;transition:all .15s;line-height:1;
507
+ }
508
+ .gallery-thumb:hover .thumb-remove{display:flex}
509
+ .thumb-remove:hover{background:#1E90FF;border-color:#1E90FF}
510
+ .gallery-add-card{
511
+ aspect-ratio:1;border-radius:10px;border:2px dashed #3f3f46;
512
+ display:flex;flex-direction:column;align-items:center;justify-content:center;
513
+ cursor:pointer;transition:all .2s ease;background:rgba(30,144,255,.03);gap:4px;
514
+ }
515
+ .gallery-add-card:hover{border-color:#1E90FF;background:rgba(30,144,255,.08)}
516
+ .gallery-add-card .add-icon{font-size:28px;color:#71717a;font-weight:300}
517
+ .gallery-add-card .add-text{font-size:12px;color:#71717a;font-weight:500}
518
+
519
+ /* ── Hint bar ── */
520
+ .hint-bar{
521
+ background:rgba(30,144,255,.06);border-top:1px solid #27272a;border-bottom:1px solid #27272a;
522
+ padding:10px 20px;font-size:13px;color:#a1a1aa;line-height:1.7;
523
+ }
524
+ .hint-bar b{color:#7CB8FF;font-weight:600}
525
+ .hint-bar kbd{
526
+ display:inline-block;padding:1px 6px;background:#27272a;border:1px solid #3f3f46;
527
+ border-radius:4px;font-family:'JetBrains Mono',monospace;font-size:11px;color:#a1a1aa;
528
+ }
529
+
530
+ /* ── Suggestions ── */
531
+ .suggestions-section{border-top:1px solid #27272a;padding:12px 16px}
532
+ .suggestions-title,.examples-title{
533
+ font-size:12px;font-weight:600;color:#71717a;text-transform:uppercase;
534
+ letter-spacing:.8px;margin-bottom:10px;
535
+ }
536
+ .suggestions-wrap{display:flex;flex-wrap:wrap;gap:6px}
537
+ .suggestion-chip{
538
+ display:inline-flex;align-items:center;gap:4px;padding:5px 12px;
539
+ background:rgba(30,144,255,.08);border:1px solid rgba(30,144,255,.2);border-radius:20px;
540
+ color:#7CB8FF;font-size:12px;font-weight:500;font-family:'Inter',sans-serif;
541
+ cursor:pointer;transition:all .15s;white-space:nowrap;
542
+ }
543
+ .suggestion-chip:hover{background:rgba(30,144,255,.15);border-color:rgba(30,144,255,.35);color:#47A3FF;transform:translateY(-1px)}
544
+
545
+ /* ── Examples ── */
546
+ .examples-section{border-top:1px solid #27272a;padding:12px 16px}
547
+ .examples-scroll{display:flex;gap:10px;overflow-x:auto;padding-bottom:8px}
548
+ .examples-scroll::-webkit-scrollbar{height:6px}
549
+ .examples-scroll::-webkit-scrollbar-track{background:#09090b;border-radius:3px}
550
+ .examples-scroll::-webkit-scrollbar-thumb{background:#27272a;border-radius:3px}
551
+ .examples-scroll::-webkit-scrollbar-thumb:hover{background:#3f3f46}
552
+ .example-card{
553
+ flex-shrink:0;width:220px;background:#09090b;border:1px solid #27272a;
554
+ border-radius:10px;overflow:hidden;cursor:pointer;transition:all .2s ease;
555
+ }
556
+ .example-card:hover{border-color:#1E90FF;transform:translateY(-2px);box-shadow:0 4px 12px rgba(30,144,255,.15)}
557
+ .example-card.loading{opacity:.5;pointer-events:none}
558
+ .example-thumbs{display:flex;height:110px;overflow:hidden;background:#18181b}
559
+ .example-thumbs img{flex:1;object-fit:cover;min-width:0;border-bottom:1px solid #27272a}
560
+ .example-thumb-placeholder{
561
+ flex:1;display:flex;align-items:center;justify-content:center;
562
+ background:#18181b;color:#3f3f46;font-size:11px;min-width:0;
563
+ }
564
+ .example-meta{padding:6px 10px 2px;display:flex;align-items:center;gap:5px;flex-wrap:wrap}
565
+ .example-badge{
566
+ display:inline-flex;padding:2px 7px;background:rgba(30,144,255,.1);border-radius:4px;
567
+ font-size:10px;font-weight:600;color:#47A3FF;font-family:'JetBrains Mono',monospace;white-space:nowrap;
568
+ }
569
+ .example-lora-badge{
570
+ display:inline-flex;padding:2px 7px;background:rgba(255,255,255,.06);border-radius:4px;
571
+ font-size:10px;font-weight:600;color:#a1a1aa;font-family:'JetBrains Mono',monospace;
572
+ white-space:nowrap;border:1px solid #27272a;max-width:130px;overflow:hidden;text-overflow:ellipsis;
573
+ }
574
+ .example-prompt-text{
575
+ padding:4px 10px 8px;font-size:11px;color:#a1a1aa;line-height:1.4;
576
+ display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
577
+ }
578
+
579
+ /* ── Right panel ── */
580
+ .panel-card{border-bottom:1px solid #27272a}
581
+ .panel-card-title{
582
+ padding:12px 20px;font-size:12px;font-weight:600;color:#71717a;
583
+ text-transform:uppercase;letter-spacing:.8px;border-bottom:1px solid rgba(39,39,42,.6);
584
+ }
585
+ .panel-card-body{padding:16px 20px;display:flex;flex-direction:column;gap:8px}
586
+ .modern-label{font-size:13px;font-weight:500;color:#a1a1aa;margin-bottom:4px;display:block}
587
+ .modern-textarea{
588
+ width:100%;background:#09090b;border:1px solid #27272a;border-radius:8px;
589
+ padding:10px 14px;font-family:'Inter',sans-serif;font-size:14px;color:#e4e4e7;
590
+ resize:vertical;outline:none;min-height:42px;transition:border-color .2s;
591
+ }
592
+ .modern-textarea:focus{border-color:#1E90FF;box-shadow:0 0 0 3px rgba(30,144,255,.15)}
593
+ .modern-textarea::placeholder{color:#3f3f46}
594
+ .modern-textarea.error-flash{
595
+ border-color:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.2)!important;animation:shake .4s ease;
596
+ }
597
+ @keyframes shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-4px)}40%,80%{transform:translateX(4px)}}
598
+
599
+ /* ── LoRA selector ── */
600
+ .lora-selector-card{border-bottom:1px solid #27272a!important;background:#0f0f13!important}
601
+ .lora-selector-body{padding:14px 20px!important;background:#0f0f13!important}
602
+ .lora-select-label{
603
+ font-size:12px!important;font-weight:600!important;
604
+ color:#71717a!important;-webkit-text-fill-color:#71717a!important;
605
+ text-transform:uppercase!important;letter-spacing:.8px!important;
606
+ margin-bottom:8px!important;display:flex!important;align-items:center!important;
607
+ gap:6px!important;font-family:'Inter',sans-serif!important;
608
+ }
609
+ .lora-select-label::before{
610
+ content:'';display:inline-block;width:8px;height:8px;
611
+ background:#1E90FF;border-radius:50%;flex-shrink:0;
612
+ }
613
+ .lora-native-select{
614
+ width:100%!important;background:#09090b!important;
615
+ border:1px solid #3f3f46!important;border-radius:8px!important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616
  padding:9px 36px 9px 14px!important;
617
  font-family:'Inter',sans-serif!important;
618
+ font-size:13px!important;font-weight:600!important;
619
+ color:#e4e4e7!important;-webkit-text-fill-color:#e4e4e7!important;
620
+ outline:none!important;appearance:none!important;-webkit-appearance:none!important;
621
+ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231E90FF' d='M6 8L1 3h10z'/%3E%3C/svg%3E")!important;
622
+ background-repeat:no-repeat!important;background-position:right 12px center!important;
623
+ cursor:pointer!important;transition:border-color .2s!important;color-scheme:dark!important;
624
+ }
625
+ .lora-native-select:focus{border-color:#1E90FF!important;box-shadow:0 0 0 3px rgba(30,144,255,.15)!important}
626
+ .lora-native-select option{background:#18181b!important;color:#e4e4e7!important}
627
+
628
+ @media (prefers-color-scheme: light){
629
+ .lora-selector-card{background:#0f0f13!important}
630
+ .lora-selector-body{background:#0f0f13!important}
631
+ .lora-select-label{color:#71717a!important;-webkit-text-fill-color:#71717a!important}
632
+ .lora-native-select{
633
+ background:#09090b!important;color:#e4e4e7!important;
634
+ -webkit-text-fill-color:#e4e4e7!important;
635
+ border-color:#3f3f46!important;color-scheme:dark!important;
636
  }
637
+ .lora-native-select option{background:#18181b!important;color:#e4e4e7!important}
638
  }
639
 
640
+ /* ── Toast ── */
641
+ .toast-notification{
642
+ position:fixed;top:24px;left:50%;transform:translateX(-50%) translateY(-120%);
643
+ z-index:9999;padding:10px 24px;border-radius:10px;font-family:'Inter',sans-serif;
644
+ font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px;
 
 
645
  box-shadow:0 8px 24px rgba(0,0,0,.5);
646
+ transition:transform .35s cubic-bezier(.34,1.56,.64,1),opacity .35s ease;opacity:0;pointer-events:none;
647
+ }
648
+ .toast-notification.visible{transform:translateX(-50%) translateY(0);opacity:1;pointer-events:auto}
649
+ .toast-notification.error{background:linear-gradient(135deg,#dc2626,#b91c1c);color:#fff;border:1px solid rgba(255,255,255,.15)}
650
+ .toast-notification.warning{background:linear-gradient(135deg,#d97706,#b45309);color:#fff;border:1px solid rgba(255,255,255,.15)}
651
+ .toast-notification.info{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;border:1px solid rgba(255,255,255,.15)}
652
+ .toast-notification .toast-icon{font-size:16px;line-height:1}
653
+ .toast-notification .toast-text{line-height:1.3}
654
+
655
+ /* ── Run button ── */
656
+ .btn-run{
657
+ display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
658
+ background:linear-gradient(135deg,#1E90FF,#1873CC);border:none;border-radius:10px;
659
+ padding:12px 24px;cursor:pointer;font-size:15px;font-weight:600;font-family:'Inter',sans-serif;
660
+ color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;transition:all .2s ease;letter-spacing:-.2px;
661
+ box-shadow:0 4px 16px rgba(30,144,255,.3),inset 0 1px 0 rgba(255,255,255,.1);
662
+ }
663
+ .btn-run:hover{
664
+ background:linear-gradient(135deg,#47A3FF,#1E90FF);transform:translateY(-1px);
665
+ box-shadow:0 6px 24px rgba(30,144,255,.45),inset 0 1px 0 rgba(255,255,255,.15);
666
+ }
667
+ .btn-run:active{transform:translateY(0);box-shadow:0 2px 8px rgba(30,144,255,.3)}
668
+ .btn-run svg{width:18px;height:18px;fill:#ffffff!important}
669
+ .btn-run svg path{fill:#ffffff!important}
670
+ #custom-run-btn,#custom-run-btn *,#custom-run-btn span,#custom-run-btn svg,
671
+ #custom-run-btn svg path,#run-btn-label,.btn-run,.btn-run *{
672
+ color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;fill:#ffffff!important;
673
+ }
674
+ body:not(.dark) .btn-run,body:not(.dark) .btn-run *,body:not(.dark) #custom-run-btn,
675
+ body:not(.dark) #custom-run-btn *{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;fill:#ffffff!important}
676
+ .dark .btn-run,.dark .btn-run *,.dark #custom-run-btn,.dark #custom-run-btn *{
677
+ color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;fill:#ffffff!important;
678
+ }
679
+ .gradio-container .btn-run,.gradio-container .btn-run *,.gradio-container #custom-run-btn,
680
+ .gradio-container #custom-run-btn *{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;fill:#ffffff!important}
681
+
682
+ /* ── Output ── */
683
+ .output-frame{border-bottom:1px solid #27272a;display:flex;flex-direction:column;position:relative}
684
+ .output-frame .out-title{
685
+ padding:10px 20px;font-size:13px;font-weight:700;color:#ffffff!important;
686
+ -webkit-text-fill-color:#ffffff!important;text-transform:uppercase;letter-spacing:.8px;
687
+ border-bottom:1px solid rgba(39,39,42,.6);display:flex;align-items:center;justify-content:space-between;
688
+ }
689
+ .output-frame .out-title span{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important}
690
+ .output-frame .out-body{
691
+ flex:1;background:#09090b;display:flex;align-items:center;justify-content:center;
692
+ overflow:hidden;min-height:240px;position:relative;
693
+ }
694
+ .output-frame .out-body img{max-width:100%;max-height:460px;image-rendering:auto}
695
+ .output-frame .out-placeholder{color:#3f3f46;font-size:13px;text-align:center;padding:20px}
696
+ .out-download-btn{
697
+ display:none;align-items:center;justify-content:center;background:rgba(30,144,255,.1);
698
+ border:1px solid rgba(30,144,255,.2);border-radius:6px;cursor:pointer;padding:3px 10px;
699
+ font-size:11px;font-weight:500;color:#7CB8FF!important;gap:4px;height:24px;transition:all .15s;
700
+ }
701
+ .out-download-btn:hover{background:rgba(30,144,255,.2);border-color:rgba(30,144,255,.35);color:#ffffff!important}
702
+ .out-download-btn.visible{display:inline-flex}
703
+ .out-download-btn svg{width:12px;height:12px;fill:#7CB8FF}
704
+ .out-download-btn:hover svg{fill:#ffffff}
705
+
706
+ /* ── Loader ── */
707
+ .modern-loader{
708
+ display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(9,9,11,.92);
709
+ z-index:15;flex-direction:column;align-items:center;justify-content:center;gap:16px;backdrop-filter:blur(4px);
710
+ }
711
+ .modern-loader.active{display:flex}
712
+ .modern-loader .loader-spinner{
713
+ width:36px;height:36px;border:3px solid #27272a;border-top-color:#1E90FF;
714
+ border-radius:50%;animation:spin .8s linear infinite;
715
+ }
716
+ @keyframes spin{to{transform:rotate(360deg)}}
717
+ .modern-loader .loader-text{font-size:13px;color:#a1a1aa;font-weight:500}
718
+ .loader-bar-track{width:200px;height:4px;background:#27272a;border-radius:2px;overflow:hidden}
719
+ .loader-bar-fill{
720
+ height:100%;background:linear-gradient(90deg,#1E90FF,#47A3FF,#1E90FF);
721
+ background-size:200% 100%;animation:shimmer 1.5s ease-in-out infinite;border-radius:2px;
722
+ }
723
+ @keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
724
+
725
+ /* ── Settings ── */
726
+ .settings-group{border:1px solid #27272a;border-radius:10px;margin:12px 16px;padding:0;overflow:hidden}
727
+ .settings-group-title{
728
+ font-size:12px;font-weight:600;color:#71717a;text-transform:uppercase;letter-spacing:.8px;
729
+ padding:10px 16px;border-bottom:1px solid #27272a;background:rgba(24,24,27,.5);
730
+ }
731
+ .settings-group-body{padding:14px 16px;display:flex;flex-direction:column;gap:12px}
732
+ .slider-row{display:flex;align-items:center;gap:10px;min-height:28px}
733
+ .slider-row label{font-size:13px;font-weight:500;color:#a1a1aa;min-width:72px;flex-shrink:0}
734
+ .slider-row input[type="range"]{
735
+ flex:1;-webkit-appearance:none;appearance:none;height:6px;background:#27272a;
736
+ border-radius:3px;outline:none;min-width:0;
737
+ }
738
+ .slider-row input[type="range"]::-webkit-slider-thumb{
739
+ -webkit-appearance:none;width:16px;height:16px;background:linear-gradient(135deg,#1E90FF,#1873CC);
740
+ border-radius:50%;cursor:pointer;box-shadow:0 2px 6px rgba(30,144,255,.4);transition:transform .15s;
741
+ }
742
+ .slider-row input[type="range"]::-webkit-slider-thumb:hover{transform:scale(1.2)}
743
+ .slider-row input[type="range"]::-moz-range-thumb{
744
+ width:16px;height:16px;background:linear-gradient(135deg,#1E90FF,#1873CC);
745
+ border-radius:50%;cursor:pointer;border:none;box-shadow:0 2px 6px rgba(30,144,255,.4);
746
+ }
747
+ .slider-row .slider-val{
748
+ min-width:52px;text-align:right;font-family:'JetBrains Mono',monospace;font-size:12px;
749
+ font-weight:500;padding:3px 8px;background:#09090b;border:1px solid #27272a;
750
+ border-radius:6px;color:#a1a1aa;flex-shrink:0;
751
+ }
752
+ .checkbox-row{display:flex;align-items:center;gap:8px;font-size:13px;color:#a1a1aa}
753
+ .checkbox-row input[type="checkbox"]{accent-color:#1E90FF;width:16px;height:16px;cursor:pointer}
754
+ .checkbox-row label{color:#a1a1aa;font-size:13px;cursor:pointer}
755
+
756
+ /* ── Status bar ── */
757
+ .app-statusbar{
758
+ background:#18181b;border-top:1px solid #27272a;padding:6px 20px;
759
+ display:flex;gap:12px;height:34px;align-items:center;font-size:12px;
760
+ }
761
+ .app-statusbar .sb-section{
762
+ padding:0 12px;flex:1;display:flex;align-items:center;font-family:'JetBrains Mono',monospace;
763
+ font-size:12px;color:#52525b;overflow:hidden;white-space:nowrap;
764
+ }
765
+ .app-statusbar .sb-section.sb-fixed{
766
+ flex:0 0 auto;min-width:90px;text-align:center;justify-content:center;
767
+ padding:3px 12px;background:rgba(30,144,255,.08);border-radius:6px;color:#47A3FF;font-weight:500;
768
+ }
769
+
770
+ /* ── Footer note ── */
771
+ .exp-note{
772
+ padding:10px 20px;font-size:12px;color:#52525b;
773
+ border-top:1px solid #27272a;text-align:center;font-weight:500;
774
+ background:#18181b;font-family:'Inter',sans-serif;
775
+ }
776
+ .exp-note a{color:#47A3FF;text-decoration:none}
777
+ .exp-note a:hover{text-decoration:underline}
778
+
779
+ /* ── Dark overrides ── */
780
+ .dark .app-shell{background:#18181b}
781
+ .dark .upload-prompt-modern{background:transparent}
782
+ .dark .panel-card{background:#18181b}
783
+ .dark .settings-group{background:#18181b}
784
+ .dark .output-frame .out-title{color:#ffffff!important}
785
+ .dark .output-frame .out-title span{color:#ffffff!important}
786
+ .dark .out-download-btn{color:#7CB8FF!important}
787
+ .dark .out-download-btn:hover{color:#ffffff!important}
788
+
789
+ /* ── Scrollbars ── */
790
+ ::-webkit-scrollbar{width:8px;height:8px}
791
+ ::-webkit-scrollbar-track{background:#09090b}
792
+ ::-webkit-scrollbar-thumb{background:#27272a;border-radius:4px}
793
+ ::-webkit-scrollbar-thumb:hover{background:#3f3f46}
794
+
795
+ /* ── Responsive ── */
796
  @media(max-width:860px){
797
+ .app-main-row{flex-direction:column}
798
+ .app-main-right{width:100%}
799
+ .app-main-left{border-right:none;border-bottom:1px solid #27272a}
800
  }
801
  """
802
 
 
827
  let selectedIdx = -1;
828
  let toastTimer = null;
829
 
830
+ /* ── Force dark + blue styles on elements that browsers may override ── */
831
  function enforceDarkStyles() {
 
832
  const loraCard = document.querySelector('.lora-selector-card');
833
  const loraBody = document.querySelector('.lora-selector-body');
834
  const loraLabel = document.querySelector('.lora-select-label');
835
  const loraEl = document.getElementById('custom-lora-select');
836
+ if (loraCard) { loraCard.style.setProperty('background','#0f0f13','important'); }
837
+ if (loraBody) { loraBody.style.setProperty('background','#0f0f13','important'); }
838
  if (loraLabel) {
839
+ loraLabel.style.setProperty('color','#71717a','important');
840
+ loraLabel.style.setProperty('-webkit-text-fill-color','#71717a','important');
841
  }
842
  if (loraEl) {
843
  loraEl.style.setProperty('background-color','#09090b','important');
844
+ loraEl.style.setProperty('color','#e4e4e7','important');
845
+ loraEl.style.setProperty('-webkit-text-fill-color','#e4e4e7','important');
846
+ loraEl.style.setProperty('border-color','#3f3f46','important');
847
  }
848
 
 
849
  const ghBtn = document.querySelector('.gh-btn');
850
  if (ghBtn) {
851
+ ghBtn.style.setProperty('background','#1E90FF','important');
852
  ghBtn.style.setProperty('color','#ffffff','important');
853
  ghBtn.style.setProperty('-webkit-text-fill-color','#ffffff','important');
854
+ ghBtn.style.setProperty('border-color','rgba(255,255,255,.18)','important');
855
+ ghBtn.style.setProperty('box-shadow','0 2px 10px rgba(30,144,255,.45)','important');
856
  const svg = ghBtn.querySelector('svg');
857
  if (svg) svg.style.setProperty('fill','#ffffff','important');
858
  const span = ghBtn.querySelector('span');
 
862
  }
863
  }
864
 
 
865
  const shell = document.querySelector('.app-shell');
866
  const header = document.querySelector('.app-header');
867
  const toolbar = document.querySelector('.app-toolbar');
868
+ if (shell) shell.style.setProperty('background','#18181b','important');
869
+ if (header) header.style.setProperty('background','#18181b','important');
870
+ if (toolbar) toolbar.style.setProperty('background','#18181b','important');
871
  }
872
 
873
  enforceDarkStyles();
874
+ setInterval(enforceDarkStyles, 1000);
875
 
 
876
  const ghBtn = document.querySelector('.gh-btn');
877
  if (ghBtn) {
878
  ghBtn.addEventListener('mouseenter', () => {
879
+ ghBtn.style.setProperty('background','#47A3FF','important');
880
  ghBtn.style.setProperty('color','#ffffff','important');
881
  ghBtn.style.setProperty('-webkit-text-fill-color','#ffffff','important');
882
  ghBtn.style.setProperty('transform','translateY(-1px)','important');
883
+ ghBtn.style.setProperty('box-shadow','0 5px 18px rgba(30,144,255,.6)','important');
884
  });
885
  ghBtn.addEventListener('mouseleave', () => {
886
+ ghBtn.style.setProperty('background','#1E90FF','important');
887
  ghBtn.style.setProperty('color','#ffffff','important');
888
  ghBtn.style.setProperty('-webkit-text-fill-color','#ffffff','important');
889
  ghBtn.style.setProperty('transform','translateY(0)','important');
890
+ ghBtn.style.setProperty('box-shadow','0 2px 10px rgba(30,144,255,.45)','important');
891
  });
892
  ghBtn.addEventListener('mousedown', () => {
893
+ ghBtn.style.setProperty('background','#1873CC','important');
894
  ghBtn.style.setProperty('transform','translateY(0)','important');
895
  });
896
  ghBtn.addEventListener('mouseup', () => {
897
+ ghBtn.style.setProperty('background','#47A3FF','important');
898
  });
899
  }
900
 
 
1250
  }
1251
  """
1252
 
1253
+ # ── SVG assets (same family/style as the FireRed-Image-Edit app, recolored via CSS) ──
1254
+ FIRE_LOGO_SVG = '<svg viewBox="0 0 24 24" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12 23c-3.6 0-8-2.69-8-7.5 0-3.5 3-6.5 4.5-8 .27-.27.75-.08.75.28v2.44c0 .42.5.63.72.28C12.28 7.5 13 3 13 1c0-.42.48-.64.8-.35C18 4.5 20 9 20 12c0 5.5-3.5 11-8 11z"/></svg>'
1255
+
1256
+ DOWNLOAD_SVG = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 16l-5-5h3V4h4v7h3l-5 5z"/><path d="M20 18H4v2h16v-2z"/></svg>'
1257
+
1258
+ UPLOAD_SVG = '<svg class="tb-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>'
1259
+
1260
+ REMOVE_SVG = '<svg class="tb-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>'
1261
+
1262
+ CLEAR_SVG = '<svg class="tb-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>'
1263
 
1264
+ GITHUB_SVG = '<svg width="15" height="15" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>'
 
 
 
 
1265
 
1266
  LORA_OPTIONS_HTML = "\n".join(
1267
  f'<option value="{html_lib.escape(name)}">{html_lib.escape(name)}</option>'
1268
  for name in ADAPTER_NAMES
1269
  )
1270
 
1271
+ # ── Gradio app ─────────────────────────────────────────────────────────────────
1272
  with gr.Blocks() as demo:
1273
 
1274
  hidden_images_b64 = gr.Textbox(value="[]", elem_id="hidden-images-b64", elem_classes="hidden-input", container=False)
 
1290
  <!-- Header -->
1291
  <div class="app-header">
1292
  <div class="app-header-left">
1293
+ <div class="app-logo">{FIRE_LOGO_SVG}</div>
1294
  <span class="app-title">Qwen-Image-Edit</span>
1295
  <span class="app-badge">2511</span>
1296
  <span class="app-badge fast">4-Step Fast</span>
1297
  </div>
1298
 
 
1299
  <a href="https://github.com/PRITHIVSAKTHIUR/Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load"
1300
  target="_blank"
1301
  class="gh-btn">
 
1330
  <div id="upload-click-area" class="upload-click-area">
1331
  <svg viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
1332
  <rect x="8" y="14" width="64" height="52" rx="6" fill="none"
1333
+ stroke="#1E90FF" stroke-width="2" stroke-dasharray="4 3"/>
1334
  <polygon points="12,62 30,40 42,50 54,34 68,62"
1335
+ fill="rgba(30,144,255,0.15)" stroke="#1E90FF" stroke-width="1.5"/>
1336
  <circle cx="28" cy="30" r="6"
1337
+ fill="rgba(30,144,255,0.2)" stroke="#1E90FF" stroke-width="1.5"/>
1338
  </svg>
1339
  <span class="upload-main-text">Click or drag images here</span>
1340
  <span class="upload-sub-text">Supports multiple images for reference-based editing and guided manipulation</span>
 
1405
 
1406
  <div style="padding:14px 18px 6px;">
1407
  <button id="custom-run-btn" class="btn-run">
1408
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="18" height="18">
1409
+ <path d="M12 23c-3.6 0-8-2.69-8-7.5 0-3.5 3-6.5 4.5-8 .27-.27.75-.08.75.28v2.44c0 .42.5.63.72.28C12.28 7.5 13 3 13 1c0-.42.48-.64.8-.35C18 4.5 20 9 20 12c0 5.5-3.5 11-8 11z" fill="white"/>
 
1410
  </svg>
1411
  <span id="run-btn-label">Edit Image</span>
1412
  </button>