Spaces:
Runtime error
Runtime error
Jonathan Malott
commited on
Commit
·
257a122
1
Parent(s):
44df93e
updated
Browse files- Procfile +1 -1
- dalle/models/__init__.py +1 -1
- dalle/models/stage1/vqgan.py +2 -2
- dalle/models/stage2/transformer.py +2 -3
- requirements.txt +7 -15
Procfile
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
web:
|
|
|
|
| 1 |
+
web: streamlit run streamlit_app.py
|
dalle/models/__init__.py
CHANGED
|
@@ -57,7 +57,7 @@ class Dalle(nn.Module):
|
|
| 57 |
lowercase=True,
|
| 58 |
dropout=None)
|
| 59 |
model.stage1.from_ckpt('.cache/minDALL-E/1.3B/stage1_last.ckpt')
|
| 60 |
-
model.stage2.from_ckpt('
|
| 61 |
#model.stage1.from_ckpt('https://utexas.box.com/shared/static/rpt9miyj2kikogyekpqnkd6y115xp51i.ckpt')
|
| 62 |
#model.stage2.from_ckpt('https://utexas.box.com/shared/static/54jc9fw0bious5nx6wvayeqaskcrdgv4.ckpt')
|
| 63 |
|
|
|
|
| 57 |
lowercase=True,
|
| 58 |
dropout=None)
|
| 59 |
model.stage1.from_ckpt('.cache/minDALL-E/1.3B/stage1_last.ckpt')
|
| 60 |
+
model.stage2.from_ckpt('.cache/minDALL-E/1.3B/stage2_last.ckpt')
|
| 61 |
#model.stage1.from_ckpt('https://utexas.box.com/shared/static/rpt9miyj2kikogyekpqnkd6y115xp51i.ckpt')
|
| 62 |
#model.stage2.from_ckpt('https://utexas.box.com/shared/static/54jc9fw0bious5nx6wvayeqaskcrdgv4.ckpt')
|
| 63 |
|
dalle/models/stage1/vqgan.py
CHANGED
|
@@ -92,8 +92,8 @@ class VQGAN(nn.Module):
|
|
| 92 |
#self.load_state_dict(ckpt, strict=strict)
|
| 93 |
#print(f'{path} successfully restored..')
|
| 94 |
|
| 95 |
-
|
| 96 |
-
ckpt = torch.utils.model_zoo.load_url('https://utexas.box.com/shared/static/rpt9miyj2kikogyekpqnkd6y115xp51i.ckpt', map_location='cpu')['state_dict']
|
| 97 |
|
| 98 |
self.load_state_dict(ckpt, strict=True)
|
| 99 |
print(f'{path} succesfully restored..')
|
|
|
|
| 92 |
#self.load_state_dict(ckpt, strict=strict)
|
| 93 |
#print(f'{path} successfully restored..')
|
| 94 |
|
| 95 |
+
ckpt = torch.load(path, map_location='cpu')['state_dict']
|
| 96 |
+
#ckpt = torch.utils.model_zoo.load_url('https://utexas.box.com/shared/static/rpt9miyj2kikogyekpqnkd6y115xp51i.ckpt', map_location='cpu')['state_dict']
|
| 97 |
|
| 98 |
self.load_state_dict(ckpt, strict=True)
|
| 99 |
print(f'{path} succesfully restored..')
|
dalle/models/stage2/transformer.py
CHANGED
|
@@ -143,9 +143,8 @@ class Transformer1d(nn.Module):
|
|
| 143 |
return logits, presents
|
| 144 |
|
| 145 |
def from_ckpt(self, path: str) -> None:
|
| 146 |
-
|
| 147 |
-
ckpt = torch.utils.model_zoo.load_url('https://utexas.box.com/shared/static/54jc9fw0bious5nx6wvayeqaskcrdgv4.ckpt', map_location='cpu')['state_dict']
|
| 148 |
-
|
| 149 |
self.load_state_dict(ckpt, strict=True)
|
| 150 |
print(f'{path} succesfully restored..')
|
| 151 |
|
|
|
|
| 143 |
return logits, presents
|
| 144 |
|
| 145 |
def from_ckpt(self, path: str) -> None:
|
| 146 |
+
ckpt = torch.load(path, map_location='cpu')['state_dict']
|
| 147 |
+
#ckpt = torch.utils.model_zoo.load_url('https://utexas.box.com/shared/static/54jc9fw0bious5nx6wvayeqaskcrdgv4.ckpt', map_location='cpu')['state_dict']
|
|
|
|
| 148 |
self.load_state_dict(ckpt, strict=True)
|
| 149 |
print(f'{path} succesfully restored..')
|
| 150 |
|
requirements.txt
CHANGED
|
@@ -1,18 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
clip_anytorch==2.4.0
|
| 4 |
htbuilder==0.6.0
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
omegaconf==2.2.2
|
| 8 |
-
|
| 9 |
-
pandas==1.4.2
|
| 10 |
-
Pillow==9.2.0
|
| 11 |
-
pytorch_lightning==1.6.3
|
| 12 |
-
ruclip==0.0.1
|
| 13 |
-
rudalle==1.1.3
|
| 14 |
-
streamlit==1.10.0
|
| 15 |
tokenizers==0.12.1
|
| 16 |
-
torch==1.8.0
|
| 17 |
-
torchvision==0.9.0
|
| 18 |
-
tqdm==4.64.0
|
|
|
|
| 1 |
+
streamlit==1.10.0
|
| 2 |
+
torch==1.11.0
|
|
|
|
| 3 |
htbuilder==0.6.0
|
| 4 |
+
torchvision==0.12.0
|
| 5 |
+
ftfy==6.0.3
|
| 6 |
+
regex==2022.1.18
|
| 7 |
+
pytorch_lightning==1.5.9
|
| 8 |
omegaconf==2.2.2
|
| 9 |
+
einops==0.4.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
tokenizers==0.12.1
|
|
|
|
|
|
|
|
|