sheldonl commited on
Commit
9320716
·
1 Parent(s): 8961203

Fix checkpoint_name bug

Browse files
Files changed (2) hide show
  1. futureworld_hf.py +4 -4
  2. test_hf.py +8 -3
futureworld_hf.py CHANGED
@@ -112,13 +112,13 @@ class AutoregressiveFutureWorld(PreTrainedModel):
112
  other_args.pop("config")
113
  config.update(other_args)
114
  model_sizes = []
115
- if "4B" in config.checkpoint_name:
116
  model_sizes.append("4B")
117
- if "5B" in config.checkpoint_name:
118
  model_sizes.append("5B")
119
- if "12B" in config.checkpoint_name:
120
  model_sizes.append("12B")
121
- if "13B" in config.checkpoint_name:
122
  model_sizes.append("13B")
123
  download_autoregressive(model_sizes, config.checkpoint_dir)
124
  model = cls(config)
 
112
  other_args.pop("config")
113
  config.update(other_args)
114
  model_sizes = []
115
+ if "4B" in config.ar_model_dir:
116
  model_sizes.append("4B")
117
+ if "5B" in config.ar_model_dir:
118
  model_sizes.append("5B")
119
+ if "12B" in config.ar_model_dir:
120
  model_sizes.append("12B")
121
+ if "13B" in config.ar_model_dir:
122
  model_sizes.append("13B")
123
  download_autoregressive(model_sizes, config.checkpoint_dir)
124
  model = cls(config)
test_hf.py CHANGED
@@ -1,5 +1,5 @@
1
  from transformers import AutoModel
2
-
3
  model = AutoModel.from_pretrained("EthanZyh/DiffusionText2WorldGeneration",
4
  offload_text_encoder_model = True,
5
  offload_diffusion_transformer = True,
@@ -8,7 +8,12 @@ model = AutoModel.from_pretrained("EthanZyh/DiffusionText2WorldGeneration",
8
  offload_tokenizer = True,
9
  offload_guardrail_models = True,
10
  trust_remote_code = True)
 
 
 
 
 
11
 
12
- prompt = "Video of humanoid robot running in a field"
 
13
 
14
- model(prompt)
 
1
  from transformers import AutoModel
2
+ '''
3
  model = AutoModel.from_pretrained("EthanZyh/DiffusionText2WorldGeneration",
4
  offload_text_encoder_model = True,
5
  offload_diffusion_transformer = True,
 
8
  offload_tokenizer = True,
9
  offload_guardrail_models = True,
10
  trust_remote_code = True)
11
+ '''
12
+
13
+ #prompt = "Video of humanoid robot running in a field"
14
+
15
+ #model(prompt)
16
 
17
+ model = AutoModel.from_pretrained("sheldonl/AutoregressiveFutureWorld",
18
+ trust_remote_code = True)
19