Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -21,7 +21,7 @@ MAX_SEED = np.iinfo(np.int32).max 
     | 
|
| 21 | 
         
             
            TMP_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "tmp")
         
     | 
| 22 | 
         
             
            DTYPE = torch.bfloat16
         
     | 
| 23 | 
         
             
            DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
         
     | 
| 24 | 
         
            -
            REPO_ID = "" # 似乎还没有
         
     | 
| 25 | 
         | 
| 26 | 
         
             
            MARKDOWN = """
         
     | 
| 27 | 
         
             
            ## Generating geometry details guided by reference image with [DetailGen3D](https://detailgen3d.github.io/DetailGen3D/)
         
     | 
| 
         @@ -85,9 +85,10 @@ os.makedirs(TMP_DIR, exist_ok=True) 
     | 
|
| 85 | 
         
             
            device = "cuda"
         
     | 
| 86 | 
         
             
            dtype = torch.float16
         
     | 
| 87 | 
         | 
| 
         | 
|
| 
         | 
|
| 88 | 
         
             
            pipeline = DetailGen3DPipeline.from_pretrained(
         
     | 
| 89 | 
         
            -
                 
     | 
| 90 | 
         
            -
                low_cpu_mem_usage=False
         
     | 
| 91 | 
         
             
            ).to(device, dtype=dtype)
         
     | 
| 92 | 
         | 
| 93 | 
         | 
| 
         | 
|
| 21 | 
         
             
            TMP_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "tmp")
         
     | 
| 22 | 
         
             
            DTYPE = torch.bfloat16
         
     | 
| 23 | 
         
             
            DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
         
     | 
| 24 | 
         
            +
            REPO_ID = "VAST-AI/DetailGen3D" # 似乎还没有
         
     | 
| 25 | 
         | 
| 26 | 
         
             
            MARKDOWN = """
         
     | 
| 27 | 
         
             
            ## Generating geometry details guided by reference image with [DetailGen3D](https://detailgen3d.github.io/DetailGen3D/)
         
     | 
| 
         | 
|
| 85 | 
         
             
            device = "cuda"
         
     | 
| 86 | 
         
             
            dtype = torch.float16
         
     | 
| 87 | 
         | 
| 88 | 
         
            +
            local_dir = "pretrained_weights/DetailGen3D"
         
     | 
| 89 | 
         
            +
            snapshot_download(repo_id=REPO_ID, local_dir=local_dir)
         
     | 
| 90 | 
         
             
            pipeline = DetailGen3DPipeline.from_pretrained(
         
     | 
| 91 | 
         
            +
                local_dir
         
     | 
| 
         | 
|
| 92 | 
         
             
            ).to(device, dtype=dtype)
         
     | 
| 93 | 
         | 
| 94 | 
         |