FrozenBurning / Text2Light

[SIGGRAPH Asia 2022] Text2Light: Zero-Shot Text-Driven HDR Panorama Generation
https://frozenburning.github.io/projects/text2light/
Other
577 stars 46 forks source link

newly built env invalid version #13

Closed codebot6000 closed 1 year ago

codebot6000 commented 1 year ago

thank you for this very interesting project. as a visual effects artist, the future of AI visual effects tools excites me.

I am trying to run your project but an hitting a few walls.

$ python text2light.py -rg ./checkpoints/global_sampler_clip -rl ./checkpoints/local_sampler_outdoor --outdir ./generated_panorama --text "a landscape of mountains with clouds on a sunny day" --clip ./clip_emb.npy --sritmo ./logs/sritmo.pth --sr_factor 4
Resuming from global sampler ckpt...
logdir:./checkpoints/global_sampler_clip
./checkpoints/global_sampler_clip/checkpoints/last.ckpt
Deleting the first-stage restore-ckpt path from the config...
Working with z of shape (1, 256, 16, 16) = 65536 dimensions.
Working with z of shape (1, 256, 16, 16) = 65536 dimensions.
Traceback (most recent call last):
  File "text2light.py", line 296, in <module>
    global_sampler = load_model(config, ckpt, gpu, eval_mode)
  File "text2light.py", line 259, in load_model
    model = load_model_from_config(config.model, state_dict, gpu=gpu, eval_mode=eval_mode)["model"]
  File "text2light.py", line 242, in load_model_from_config
    model = instantiate_from_config(config)
  File "/media/po/FasterTheFaster/apps/Text2Light/taming/util.py", line 28, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/media/po/FasterTheFaster/apps/Text2Light/taming/models/global_sampler.py", line 135, in __init__
    super().__init__(transformer_config, first_stage_config, cond_stage_config, permuter_config, ckpt_path, ignore_keys, first_stage_key, cond_stage_key, downsample_cond_size, pkeep, sos_token, unconditional)
  File "/media/po/FasterTheFaster/apps/Text2Light/taming/models/base_sampler.py", line 39, in __init__
    self.transformer = instantiate_from_config(config=transformer_config)
  File "/media/po/FasterTheFaster/apps/Text2Light/taming/util.py", line 28, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/media/po/FasterTheFaster/apps/Text2Light/taming/util.py", line 23, in get_obj_from_str
    return getattr(importlib.import_module(module, package=None), cls)
  File "/home/po/anaconda3/envs/text2light/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/media/po/FasterTheFaster/apps/Text2Light/taming/modules/transformer/mingpt.py", line 17, in <module>
    from transformers import top_k_top_p_filtering
  File "/home/po/anaconda3/envs/text2light/lib/python3.8/site-packages/transformers/__init__.py", line 43, in <module>
    from . import dependency_versions_check
  File "/home/po/anaconda3/envs/text2light/lib/python3.8/site-packages/transformers/dependency_versions_check.py", line 41, in <module>
    require_version_core(deps[pkg])
  File "/home/po/anaconda3/envs/text2light/lib/python3.8/site-packages/transformers/utils/versions.py", line 94, in require_version_core
    return require_version(requirement, hint)
  File "/home/po/anaconda3/envs/text2light/lib/python3.8/site-packages/transformers/utils/versions.py", line 85, in require_version
    if want_ver is not None and not ops[op](version.parse(got_ver), version.parse(want_ver)):
  File "/home/po/anaconda3/envs/text2light/lib/python3.8/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/home/po/anaconda3/envs/text2light/lib/python3.8/site-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '0.10.1,<0.11'

not being a master of python it appears that one of the anaconda downloaded packages is out of date?

FrozenBurning commented 1 year ago

Thanks for your interest in our work. You may refer to this issue for a fix. It seems that pip install packaging==21.3 works for most cases.

FrozenBurning commented 1 year ago

Closed due to inactivity. Feel free to reopen it 🙌