Spaces:
Running
on
Zero
Running
on
Zero
File size: 574 Bytes
37c80b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from .pipeline_terrain import TerrainDiffusionPipeline
from huggingface_hub import hf_hub_download, snapshot_download
import os
import torch
def build_pipe():
print('Downloading weights...')
try:
os.mkdir('./weights/')
except:
True
snapshot_download(repo_id="NewtNewt/MESA", local_dir="./weights")
weight_path = './weights'
print('[DONE]')
print('Instantiating Model...')
pipe = TerrainDiffusionPipeline.from_pretrained(weight_path, torch_dtype=torch.float16)
pipe.to("cuda")
print('[DONE]')
return pipe |