Spaces:
				
			
			
	
			
			
		Paused
		
	
	
	
			
			
	
	
	
	
		
		
		Paused
		
	Update src/demo/examples.py
Browse files- src/demo/examples.py +23 -7
 
    	
        src/demo/examples.py
    CHANGED
    
    | 
         @@ -7,6 +7,9 @@ 
     | 
|
| 7 | 
         
             
            #     return mask
         
     | 
| 8 | 
         | 
| 9 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 10 | 
         
             
            mix_example = [[
         
     | 
| 11 | 
         
             
                "./examples/lawn_mower.wav",  # Background audio path
         
     | 
| 12 | 
         
             
                "Lawn mower can be heard",  # Background caption
         
     | 
| 
         @@ -17,12 +20,17 @@ mix_example = [[ 
     | 
|
| 17 | 
         
             
                16,  # df
         
     | 
| 18 | 
         
             
                1,  # resize_scale_t
         
     | 
| 19 | 
         
             
                1,  # resize_scale_f
         
     | 
| 20 | 
         
            -
                 
     | 
| 21 | 
         
            -
                 
     | 
| 22 | 
         
             
                1.2,  # guidance_scale
         
     | 
| 23 | 
         
             
                0.4,  # sde_strength
         
     | 
| 24 | 
         
             
                1.5   # energy_scale
         
     | 
| 25 | 
         
             
            ]]
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 26 | 
         
             
            remove_example = [[
         
     | 
| 27 | 
         
             
                "./examples/tick_noise_with_laughter.wav",  # Background audio path
         
     | 
| 28 | 
         
             
                "Scrape, Tick, Noise, Tuning fork, Breathing, Generic impact sounds with the sound of Door, Clicking, Female speech, woman speaking, Conversation, Laughter, Breathing, Human voice",  # Background caption
         
     | 
| 
         @@ -32,14 +40,19 @@ remove_example = [[ 
     | 
|
| 32 | 
         
             
                0,  # df
         
     | 
| 33 | 
         
             
                1,  # resize_scale_t
         
     | 
| 34 | 
         
             
                1,  # resize_scale_f
         
     | 
| 35 | 
         
            -
                 
     | 
| 36 | 
         
            -
                 
     | 
| 37 | 
         
            -
                0. 
     | 
| 38 | 
         
            -
                 
     | 
| 39 | 
         
             
                0.1,  # sde_strength
         
     | 
| 40 | 
         
            -
                 
     | 
| 41 | 
         
             
            ]]
         
     | 
| 
         | 
|
| 
         | 
|
| 42 | 
         
             
            moveandrescale_example = [
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 43 | 
         
             
                ["./examples/acoustic_guitar.wav",  # Background audio path
         
     | 
| 44 | 
         
             
                 "Acoustic guitar",  # Background caption
         
     | 
| 45 | 
         
             
                 20,  # dt
         
     | 
| 
         @@ -54,6 +67,9 @@ moveandrescale_example = [ 
     | 
|
| 54 | 
         
             
                 0.0,  # sde_strength
         
     | 
| 55 | 
         
             
                 1.5,  # energy_scale
         
     | 
| 56 | 
         
             
                 ],
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 57 | 
         
             
                ["./examples/high_pitch.wav",  # Background audio path
         
     | 
| 58 | 
         
             
                 "High pitch",  # Background caption
         
     | 
| 59 | 
         
             
                 0,  # dt
         
     | 
| 
         | 
|
| 7 | 
         
             
            #     return mask
         
     | 
| 8 | 
         | 
| 9 | 
         | 
| 10 | 
         
            +
            # Reference region:
         
     | 
| 11 | 
         
            +
            # t_on 0 t_off 1000 \
         
     | 
| 12 | 
         
            +
            # f_low 0 f_up 30 \
         
     | 
| 13 | 
         
             
            mix_example = [[
         
     | 
| 14 | 
         
             
                "./examples/lawn_mower.wav",  # Background audio path
         
     | 
| 15 | 
         
             
                "Lawn mower can be heard",  # Background caption
         
     | 
| 
         | 
|
| 20 | 
         
             
                16,  # df
         
     | 
| 21 | 
         
             
                1,  # resize_scale_t
         
     | 
| 22 | 
         
             
                1,  # resize_scale_f
         
     | 
| 23 | 
         
            +
                0,  # w_content
         
     | 
| 24 | 
         
            +
                80,  # w_edit
         
     | 
| 25 | 
         
             
                1.2,  # guidance_scale
         
     | 
| 26 | 
         
             
                0.4,  # sde_strength
         
     | 
| 27 | 
         
             
                1.5   # energy_scale
         
     | 
| 28 | 
         
             
            ]]
         
     | 
| 29 | 
         
            +
             
     | 
| 30 | 
         
            +
             
     | 
| 31 | 
         
            +
            # Reference region:
         
     | 
| 32 | 
         
            +
            # t_on 0 t_off 100 \
         
     | 
| 33 | 
         
            +
            # f_low 0  f_up 60 \
         
     | 
| 34 | 
         
             
            remove_example = [[
         
     | 
| 35 | 
         
             
                "./examples/tick_noise_with_laughter.wav",  # Background audio path
         
     | 
| 36 | 
         
             
                "Scrape, Tick, Noise, Tuning fork, Breathing, Generic impact sounds with the sound of Door, Clicking, Female speech, woman speaking, Conversation, Laughter, Breathing, Human voice",  # Background caption
         
     | 
| 
         | 
|
| 40 | 
         
             
                0,  # df
         
     | 
| 41 | 
         
             
                1,  # resize_scale_t
         
     | 
| 42 | 
         
             
                1,  # resize_scale_f
         
     | 
| 43 | 
         
            +
                5,  # w_content
         
     | 
| 44 | 
         
            +
                40, # w_edit
         
     | 
| 45 | 
         
            +
                0.1, # w_contrast
         
     | 
| 46 | 
         
            +
                1.2,  # guidance_scale
         
     | 
| 47 | 
         
             
                0.1,  # sde_strength
         
     | 
| 48 | 
         
            +
                1.5,  # energy_scale
         
     | 
| 49 | 
         
             
            ]]
         
     | 
| 50 | 
         
            +
             
     | 
| 51 | 
         
            +
             
     | 
| 52 | 
         
             
            moveandrescale_example = [
         
     | 
| 53 | 
         
            +
                # Reference region:
         
     | 
| 54 | 
         
            +
                # t_on 258 t_off 768 \
         
     | 
| 55 | 
         
            +
                # f_low 0  f_up 64 \
         
     | 
| 56 | 
         
             
                ["./examples/acoustic_guitar.wav",  # Background audio path
         
     | 
| 57 | 
         
             
                 "Acoustic guitar",  # Background caption
         
     | 
| 58 | 
         
             
                 20,  # dt
         
     | 
| 
         | 
|
| 67 | 
         
             
                 0.0,  # sde_strength
         
     | 
| 68 | 
         
             
                 1.5,  # energy_scale
         
     | 
| 69 | 
         
             
                 ],
         
     | 
| 70 | 
         
            +
                # Reference region:
         
     | 
| 71 | 
         
            +
                # t_on 0 t_off 512 \
         
     | 
| 72 | 
         
            +
                # f_low 10  f_up 64 \
         
     | 
| 73 | 
         
             
                ["./examples/high_pitch.wav",  # Background audio path
         
     | 
| 74 | 
         
             
                 "High pitch",  # Background caption
         
     | 
| 75 | 
         
             
                 0,  # dt
         
     |