ginipick commited on
Commit
50e9194
ยท
verified ยท
1 Parent(s): 81eb577

Update ui/components.py

Browse files
Files changed (1) hide show
  1. ui/components.py +19 -20
ui/components.py CHANGED
@@ -451,19 +451,6 @@ def create_text2music_ui(
451
  placeholder="์ฝค๋งˆ๋กœ ๊ตฌ๋ถ„๋œ ํƒœ๊ทธ๋“ค...",
452
  )
453
 
454
- # ์žฅ๋ฅด ํ”„๋ฆฌ์…‹ ๋ณ€๊ฒฝ ์ด๋ฒคํŠธ
455
- genre_preset.change(
456
- fn=update_tags_from_preset,
457
- inputs=[genre_preset],
458
- outputs=[prompt]
459
- )
460
-
461
- quality_preset.change(
462
- fn=lambda x: QUALITY_PRESETS.get(x, {}).get("description", ""),
463
- inputs=[quality_preset],
464
- outputs=[preset_description]
465
- )
466
-
467
  with gr.Group():
468
  gr.Markdown("""### ๐Ÿ“ ๊ฐ€์‚ฌ ์ž…๋ ฅ
469
  <center>๊ตฌ์กฐ ํƒœ๊ทธ [verse], [chorus], [bridge] ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.<br>[instrumental] ๋˜๋Š” [inst]๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—ฐ์ฃผ๊ณก์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.</center>""")
@@ -518,13 +505,6 @@ def create_text2music_ui(
518
  info="Seed for the generation",
519
  )
520
 
521
- # ํ’ˆ์งˆ ํ”„๋ฆฌ์…‹ ๋ณ€๊ฒฝ ์ด๋ฒคํŠธ
522
- quality_preset.change(
523
- fn=update_quality_preset,
524
- inputs=[quality_preset],
525
- outputs=[infer_step, guidance_scale, scheduler_type, omega_scale, use_erg_diffusion, use_erg_tag]
526
- )
527
-
528
  with gr.Accordion("Advanced Settings", open=False):
529
  scheduler_type = gr.Radio(
530
  ["euler", "heun"],
@@ -602,6 +582,25 @@ def create_text2music_ui(
602
 
603
  text2music_bnt = gr.Button("๐ŸŽต Generate Music", variant="primary", size="lg")
604
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
605
  with gr.Column():
606
  outputs, input_params_json = create_output_ui()
607
 
 
451
  placeholder="์ฝค๋งˆ๋กœ ๊ตฌ๋ถ„๋œ ํƒœ๊ทธ๋“ค...",
452
  )
453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  with gr.Group():
455
  gr.Markdown("""### ๐Ÿ“ ๊ฐ€์‚ฌ ์ž…๋ ฅ
456
  <center>๊ตฌ์กฐ ํƒœ๊ทธ [verse], [chorus], [bridge] ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.<br>[instrumental] ๋˜๋Š” [inst]๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—ฐ์ฃผ๊ณก์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.</center>""")
 
505
  info="Seed for the generation",
506
  )
507
 
 
 
 
 
 
 
 
508
  with gr.Accordion("Advanced Settings", open=False):
509
  scheduler_type = gr.Radio(
510
  ["euler", "heun"],
 
582
 
583
  text2music_bnt = gr.Button("๐ŸŽต Generate Music", variant="primary", size="lg")
584
 
585
+ # ๋ชจ๋“  UI ์š”์†Œ๊ฐ€ ์ •์˜๋œ ํ›„ ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ ์„ค์ •
586
+ genre_preset.change(
587
+ fn=update_tags_from_preset,
588
+ inputs=[genre_preset],
589
+ outputs=[prompt]
590
+ )
591
+
592
+ quality_preset.change(
593
+ fn=lambda x: QUALITY_PRESETS.get(x, {}).get("description", ""),
594
+ inputs=[quality_preset],
595
+ outputs=[preset_description]
596
+ )
597
+
598
+ quality_preset.change(
599
+ fn=update_quality_preset,
600
+ inputs=[quality_preset],
601
+ outputs=[infer_step, guidance_scale, scheduler_type, omega_scale, use_erg_diffusion, use_erg_tag]
602
+ )
603
+
604
  with gr.Column():
605
  outputs, input_params_json = create_output_ui()
606