Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-conf and -ckpt argument question | use other models #130

Open
felixbro opened this issue Feb 10, 2022 · 1 comment
Open

-conf and -ckpt argument question | use other models #130

felixbro opened this issue Feb 10, 2022 · 1 comment

Comments

@felixbro
Copy link

Hello there, i have a issue with the -conf and -ckpt arguments:
i would like to use another model but how do i use them?
i type this in the Anaconda Promt:
python generate.py -p "man by Peter Paul Rubens" -ii samples/fb.jpg -i 1200 -se 10 -o output/output6.png -conf checkpoints/faceshq.yaml -ckpt checkpoints/faceshq.ckpt

facehq.yaml and facehq.ckpt are in the checkpoints folder. i only get this error:

(vqgan) d:\AI_Images\VQGAN-CLIP>python generate.py -p "man by Peter Paul Rubens" -ii samples/fb.jpg -i 1200 -se 10 -o output/output6.png -conf checkpoints/faceshq.yaml -ckpt checkpoints/faceshq.ckpt
Working with z of shape (1, 256, 16, 16) = 65536 dimensions.
Traceback (most recent call last):
File "d:\AI_Images\VQGAN-CLIP\generate.py", line 546, in
model = load_vqgan_model(args.vqgan_config, args.vqgan_checkpoint).to(device)
File "d:\AI_Images\VQGAN-CLIP\generate.py", line 527, in load_vqgan_model
parent_model = cond_transformer.Net2NetTransformer(**config.model.params)
File "d:\AI_Images\VQGAN-CLIP\taming-transformers\taming\models\cond_transformer.py", line 41, in init
self.transformer = instantiate_from_config(config=transformer_config)
File "d:\AI_Images\VQGAN-CLIP\taming-transformers\main.py", line 119, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict()))
File "d:\AI_Images\VQGAN-CLIP\taming-transformers\main.py", line 22, in get_obj_from_str
return getattr(importlib.import_module(module, package=None), cls)
File "C:\Users\fb\Anaconda3\envs\vqgan\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "d:\AI_Images\VQGAN-CLIP\taming-transformers\taming\modules\transformer\mingpt.py", line 17, in
from transformers import top_k_top_p_filtering
ModuleNotFoundError: No module named 'transformers'

i only have a D:\AI_Images\VQGAN-CLIP\taming-transformers\taming\modules\transformer folder, not transformers
what can i do?

@WaGi-Coding
Copy link

I had the same issue for a range of different models. It was driving me crazy. The issue is the difference between the official python pip package for taming-transformers and the github repo. It's solved by installing the github version.

pip install transformers
pip uninstall taming-transformers
pip install git+https://github.com/CompVis/taming-transformers

This should work for:
Ade20k
CelebAHQ
Cin
Coco
Drin
FacesHQ
FFHQ
Gumbel
Imagenet_1024
Imagenet_16384
SFlckr
Wikiart

Originally posted by @GucciFlipFlops1917 in #106 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants