Comments (11)
Yes you need to install another package which is surely available there in GitHub
from instruct-pix2pix.
Yeah - unsure what the missing package is. Also, shouldn't torch.load use map_location="gpu" ?
from instruct-pix2pix.
There are other simple deep face program available in GitHub from using that GitHub files you will come around with file requirements.txt where library likes pytorch and others are mentions just download it and run on your pc so that all requirements related to libraries will be fullfil and then go with the flow
from instruct-pix2pix.
Can you suggest one that might work with this repo?
from instruct-pix2pix.
Hey, I'm not quite familiar enough with OSX Cuda support, so I wouldn't be able to tell you whether this will work or not. My expectation, though, is that you'll need a machine with a dedicated Nvidia GPU.
Regarding colab and requirements, this requirements.txt file should work:
https://huggingface.co/spaces/timbrooks/instruct-pix2pix/blob/main/requirements.txt
Closing for now, feel free to comment if you have more questions.
from instruct-pix2pix.
unfortunately the issue is not resolved. I installed requirements.txt as indicated, created a new run time and get this same error on Colab:
Loading model from checkpoints/instruct-pix2pix-00-22000.ckpt
Traceback (most recent call last):
File "edit_cli.py", line 128, in
main()
File "edit_cli.py", line 79, in main
model = load_model_from_config(config, args.ckpt, args.vae_ckpt)
File "edit_cli.py", line 41, in load_model_from_config
pl_sd = torch.load(ckpt, map_location="cpu")
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 705, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 243, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
from instruct-pix2pix.
Found a post online that suggests maybe the downloaded checkpoint is corrupted:
Can you try redownloading the checkpoint? Another thing you can do is verify that the checksum of the two files are the same.
from instruct-pix2pix.
I will retry: bash scripts/download_checkpoints.sh
from instruct-pix2pix.
It was a good suggestion. This time, the ckpt downloaded completely. However, another error arises:
Loading model from checkpoints/instruct-pix2pix-00-22000.ckpt
Global Step: 22000
2023-01-22 05:26:37.495888: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0
.
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
SystemError: <built-in method contains of dict object at 0x7f4b692e97c0> returned a result with an error set
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "edit_cli.py", line 128, in
main()
File "edit_cli.py", line 79, in main
model = load_model_from_config(config, args.ckpt, args.vae_ckpt)
File "edit_cli.py", line 52, in load_model_from_config
model = instantiate_from_config(config.model)
File "/content/drive/MyDrive/instruct-pix2pix/stable_diffusion/ldm/util.py", line 85, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict()))
File "/content/drive/MyDrive/instruct-pix2pix/stable_diffusion/ldm/util.py", line 93, in get_obj_from_str
return getattr(importlib.import_module(module, package=None), cls)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/content/drive/MyDrive/instruct-pix2pix/./stable_diffusion/ldm/models/diffusion/ddpm_edit.py", line 15, in
import pytorch_lightning as pl
File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/init.py", line 20, in
from pytorch_lightning import metrics # noqa: E402
File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/metrics/init.py", line 15, in
from pytorch_lightning.metrics.classification import ( # noqa: F401
File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/metrics/classification/init.py", line 14, in
from pytorch_lightning.metrics.classification.accuracy import Accuracy # noqa: F401
File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/metrics/classification/accuracy.py", line 16, in
from torchmetrics import Accuracy as _Accuracy
File "/usr/local/lib/python3.8/dist-packages/torchmetrics/init.py", line 14, in
from torchmetrics import functional # noqa: E402
File "/usr/local/lib/python3.8/dist-packages/torchmetrics/functional/init.py", line 68, in
from torchmetrics.functional.text.bert import bert_score
File "/usr/local/lib/python3.8/dist-packages/torchmetrics/functional/text/bert.py", line 28, in
from transformers import AutoModel, AutoTokenizer
File "/usr/local/lib/python3.8/dist-packages/transformers/init.py", line 30, in
from . import dependency_versions_check
File "/usr/local/lib/python3.8/dist-packages/transformers/dependency_versions_check.py", line 17, in
from .utils.versions import require_version, require_version_core
File "/usr/local/lib/python3.8/dist-packages/transformers/utils/init.py", line 34, in
from .generic import (
File "/usr/local/lib/python3.8/dist-packages/transformers/utils/generic.py", line 33, in
import tensorflow as tf
File "/usr/local/lib/python3.8/dist-packages/tensorflow/init.py", line 37, in
from tensorflow.python.tools import module_util as _module_util
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/init.py", line 37, in
from tensorflow.python.eager import context
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/context.py", line 35, in
from tensorflow.python.client import pywrap_tf_session
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/client/pywrap_tf_session.py", line 19, in
from tensorflow.python.client._pywrap_tf_session import *
ImportError: initialization failed
from instruct-pix2pix.
Maybe it is a numpy versioning error
from instruct-pix2pix.
I found this notebook on the web. It works: https://colab.research.google.com/drive/1spBkNSsIgaEvwr9JjAUKcPWy8ruxIwky?usp=sharing
from instruct-pix2pix.
Related Issues (20)
- About pix2pix access huggingface URL
- "Some weights of the model checkpoint at openai/clip-vit-large-patch14 were not used" HOT 2
- Hi , any update ?
- The edit_cli runs well but edit_app returns nothing. HOT 1
- FeatureReguest/Enhancement/Idea
- NOT the file config.json?
- which version cuda should i choose for this application?
- Cannot Download Checkpoint HOT 2
- finetuning pretrained model using the custom dataset HOT 5
- Learning Rate scheduler
- demo broken
- How to Accelerate Training Data Generation with SDXL-Turbo or LCM?
- Torch version conflict between ip2p and k-diffusion HOT 1
- is the finetuned GPT3 model that generates edit captions from edit instructions openly available?
- Max Resolution
- Prompt to prompt implementation for dataset generation
- metadata.jsonl in the clip-filtered-dataset
- AttributeError: 'AutoencoderKL' object has no attribute 'quantize' HOT 2
- RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) HOT 3
- Masking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instruct-pix2pix.