QHL067 commited on
Commit
8ceb5f5
·
1 Parent(s): 20ddbb6
__pycache__/sde.cpython-310.pyc ADDED
Binary file (12.4 kB). View file
 
__pycache__/utils.cpython-310.pyc ADDED
Binary file (9.39 kB). View file
 
app.py CHANGED
@@ -16,6 +16,7 @@ import numpy as np
16
  import torch
17
  import torch.nn.functional as F
18
  from torchvision.utils import save_image
 
19
 
20
  from absl import logging
21
  import ml_collections
@@ -104,10 +105,12 @@ MAX_SEED = np.iinfo(np.int32).max
104
  MAX_IMAGE_SIZE = 1024 # Currently not used.
105
 
106
  # Load the main diffusion model.
107
- nnet_path = os.path.join("..", "..", "ckpt", "released_model", "t2i_512px_clip_dimr.pth")
 
 
108
  nnet = utils.get_nnet(**config.nnet)
109
  nnet = nnet.to(device)
110
- state_dict = torch.load(nnet_path, map_location=device)
111
  nnet.load_state_dict(state_dict)
112
  nnet.eval()
113
 
 
16
  import torch
17
  import torch.nn.functional as F
18
  from torchvision.utils import save_image
19
+ from huggingface_hub import hf_hub_download
20
 
21
  from absl import logging
22
  import ml_collections
 
105
  MAX_IMAGE_SIZE = 1024 # Currently not used.
106
 
107
  # Load the main diffusion model.
108
+ repo_id = "QHL067/CrossFlow"
109
+ filename = "pretrained_models/t2i_512px_clip_dimr.pth"
110
+ checkpoint_path = hf_hub_download(repo_id=repo_id, filename=filename)
111
  nnet = utils.get_nnet(**config.nnet)
112
  nnet = nnet.to(device)
113
+ state_dict = torch.load(checkpoint_path, map_location=device)
114
  nnet.load_state_dict(state_dict)
115
  nnet.eval()
116
 
configs/__pycache__/t2i_512px_clip_dimr.cpython-310.pyc ADDED
Binary file (2.61 kB). View file
 
diffusion/__pycache__/base_solver.cpython-310.pyc ADDED
Binary file (5.11 kB). View file
 
diffusion/__pycache__/flow_matching.cpython-310.pyc ADDED
Binary file (17.7 kB). View file
 
libs/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (124 Bytes). View file
 
libs/__pycache__/autoencoder.cpython-310.pyc ADDED
Binary file (12.9 kB). View file
 
libs/__pycache__/clip.cpython-310.pyc ADDED
Binary file (3.28 kB). View file
 
libs/model/__pycache__/axial_rope.cpython-310.pyc ADDED
Binary file (4.29 kB). View file
 
libs/model/__pycache__/common_layers.cpython-310.pyc ADDED
Binary file (4.56 kB). View file
 
libs/model/__pycache__/dimr_t2i.cpython-310.pyc ADDED
Binary file (14.3 kB). View file
 
libs/model/__pycache__/flags.cpython-310.pyc ADDED
Binary file (1.83 kB). View file
 
libs/model/__pycache__/trans_autoencoder.cpython-310.pyc ADDED
Binary file (8.57 kB). View file
 
libs/model/sigmoid/__pycache__/kernel.cpython-310.pyc ADDED
Binary file (8.6 kB). View file
 
libs/model/sigmoid/__pycache__/module.cpython-310.pyc ADDED
Binary file (8.98 kB). View file