Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	Reorder startup functions in app.py to ensure musubi-tuner is cloned before downloading models. This change maintains the intended execution flow during application startup.
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -532,11 +532,11 @@ def _startup_download_models() -> None: 
     | 
|
| 532 | 
         | 
| 533 | 
         | 
| 534 | 
         
             
            if __name__ == "__main__":
         
     | 
| 535 | 
         
            -
                #  
     | 
| 536 | 
         
            -
                 
     | 
| 537 | 
         | 
| 538 | 
         
            -
                #  
     | 
| 539 | 
         
            -
                 
     | 
| 540 | 
         | 
| 541 | 
         
             
                # 3) Launch Gradio app
         
     | 
| 542 | 
         
             
                ui = build_ui()
         
     | 
| 
         | 
|
| 532 | 
         | 
| 533 | 
         | 
| 534 | 
         
             
            if __name__ == "__main__":
         
     | 
| 535 | 
         
            +
                # 1) Ensure musubi-tuner is cloned before anything else
         
     | 
| 536 | 
         
            +
                _startup_clone_musubi_tuner()
         
     | 
| 537 | 
         | 
| 538 | 
         
            +
                # 2) Download models at startup (blocking by design)
         
     | 
| 539 | 
         
            +
                _startup_download_models()
         
     | 
| 540 | 
         | 
| 541 | 
         
             
                # 3) Launch Gradio app
         
     | 
| 542 | 
         
             
                ui = build_ui()
         
     |