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

list index out of range error when loading model in local dir #149

Open
ssgg-code opened this issue Sep 25, 2024 · 0 comments
Open

list index out of range error when loading model in local dir #149

ssgg-code opened this issue Sep 25, 2024 · 0 comments

Comments

@ssgg-code
Copy link

import torch from diffusers import KolorsPipeline pipe = KolorsPipeline.from_pretrained( "/nvme/xxx/models/Kwai-Kolors/Kolors", torch_dtype=torch.float16, variant="fp16" ).to("cuda")

库版本用的都是官网的requirement

本地路径会报错
730 folder_path = os.path.join(cached_folder, folder)
731 is_folder = os.path.isdir(folder_path) and folder in config_dict
732 variant_exists = is_folder and any(
--> 733 p.split(".")[1].startswith(variant) for p in os.listdir(folder_path)
734 )
735 if variant_exists:
736 model_variants[folder] = variant

IndexError: list index out of range

用sample.py的方法不报错

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

1 participant