Flourish commited on
Commit
bfdbe84
·
verified ·
1 Parent(s): 38cf7cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -26,7 +26,7 @@ device = "cuda"
26
  _dtype = torch.bfloat16
27
  hf_token = os.getenv("HF_TOKEN")
28
 
29
- # init ovis_image
30
  model_config = ovis_image_configs["ovis-image-7b"]
31
  ovis_image = OvisImageModel(model_config)
32
  ovis_image_path = hf_hub_download(
@@ -41,7 +41,7 @@ print(f"Load Unexpected Keys {unexpected_keys}")
41
  ovis_image = ovis_image.to(device=device, dtype=_dtype)
42
  ovis_image.eval()
43
 
44
- # init vae
45
  vae_path = hf_hub_download(
46
  repo_id="AIDC-AI/Ovis-Image-7B",
47
  filename="ae.safetensors",
@@ -56,10 +56,10 @@ autoencoder = load_ae(
56
  )
57
  autoencoder.eval()
58
 
59
- # init ovis
60
  ovis_path = hf_hub_download(
61
  repo_id="AIDC-AI/Ovis-Image-7B",
62
- filename="Ovis2.5-2B",
63
  token=hf_token,
64
  )
65
  ovis_tokenizer = build_ovis_tokenizer(ovis_path)
 
26
  _dtype = torch.bfloat16
27
  hf_token = os.getenv("HF_TOKEN")
28
 
29
+ print("init ovis_image")
30
  model_config = ovis_image_configs["ovis-image-7b"]
31
  ovis_image = OvisImageModel(model_config)
32
  ovis_image_path = hf_hub_download(
 
41
  ovis_image = ovis_image.to(device=device, dtype=_dtype)
42
  ovis_image.eval()
43
 
44
+ print("init vae")
45
  vae_path = hf_hub_download(
46
  repo_id="AIDC-AI/Ovis-Image-7B",
47
  filename="ae.safetensors",
 
56
  )
57
  autoencoder.eval()
58
 
59
+ print("init ovis")
60
  ovis_path = hf_hub_download(
61
  repo_id="AIDC-AI/Ovis-Image-7B",
62
+ subfolder="Ovis2.5-2B",
63
  token=hf_token,
64
  )
65
  ovis_tokenizer = build_ovis_tokenizer(ovis_path)