Installation issues: Complete guide to fix env setup and run PowerPaint demo
Bad installation readme
You mentioned that one of the ways to install PowerPaint is:
git clone https://github.com/open-mmlab/PowerPaint
conda env create -f requirements/ppt.yaml
conda activate ppt
- No file ppt.yaml (it's ppt.yml) -> fix this.
- Add 'cd PowerPaint' after cloning repo -> more user-friendly
With these instructions I get error:
ERROR: Ignored the following versions that require a different python version: 0.23.0 Requires-Python >=3.10; 0.23.0rc0 Requires-Python >=3.10; 0.23.0rc2 Requires-Python >=3.10; 0.23.1 Requires-Python >=3.10; 0.23.2 Requires-Python >=3.10; 0.23.2rc1 Requires-Python >=3.10; 0.25.0 Requires-Python >=3.10; 0.25.0rc0 Requires-Python >=3.10; 0.25.0rc1 Requires-Python >=3.10; 0.25.0rc2 Requires-Python >=3.10; 0.25.1 Requires-Python >=3.10; 0.25.2 Requires-Python >=3.10; 0.25.2rc0 Requires-Python >=3.10; 1.10.0 Requires-Python >=3.10; 1.14.0 Requires-Python >=3.10; 1.14.0rc1 Requires-Python >=3.10; 1.14.0rc2 Requires-Python >=3.10; 1.14.1 Requires-Python >=3.10; 1.15.0 Requires-Python >=3.10; 1.15.0rc1 Requires-Python >=3.10; 1.15.0rc2 Requires-Python >=3.10; 1.15.1 Requires-Python >=3.10; 1.15.2 Requires-Python >=3.10; 1.15.3 Requires-Python >=3.10; 1.3.1 Requires-Python >=3.10; 1.3.2 Requires-Python >=3.10; 1.4.0 Requires-Python >=3.10; 1.4.0b1 Requires-Python >=3.10; 1.4.0b2 Requires-Python >=3.10; 1.4.0b3 Requires-Python >=3.10; 1.4.0b4 Requires-Python >=3.10; 1.4.0b5 Requires-Python >=3.10; 1.4.2 Requires-Python >=3.10; 1.4.3 Requires-Python >=3.10; 1.4.8 Requires-Python >=3.10; 1.5.0 Requires-Python >=3.10; 1.5.1 Requires-Python >=3.10; 1.5.2 Requires-Python >=3.10; 1.5.3 Requires-Python >=3.10; 1.5.4 Requires-Python >=3.10; 1.6.0 Requires-Python >=3.10; 1.7.0 Requires-Python >=3.10; 1.7.1 Requires-Python >=3.10; 1.7.2 Requires-Python >=3.10; 1.8.0 Requires-Python >=3.10; 1.9.0 Requires-Python >=3.10; 1.9.1 Requires-Python >=3.10; 2.1.0 Requires-Python >=3.10; 2.1.0rc1 Requires-Python >=3.10; 2.1.1 Requires-Python >=3.10; 2.1.2 Requires-Python >=3.10; 2.1.3 Requires-Python >=3.10; 2.2.0 Requires-Python >=3.10; 2.2.0rc1 Requires-Python >=3.10; 2.2.1 Requires-Python >=3.10; 2.2.2 Requires-Python >=3.10; 2.2.3 Requires-Python >=3.10; 2.2.4 Requires-Python >=3.10; 2.2.5 Requires-Python >=3.10; 2024.12.12 Requires-Python >=3.10; 2024.9.20 Requires-Python >=3.10; 2025.1.10 Requires-Python >=3.10; 2025.2.18 Requires-Python >=3.10; 2025.3.13 Requires-Python >=3.10; 2025.3.30 Requires-Python >=3.10; 2025.5.10 Requires-Python >=3.10; 3.10.0 Requires-Python >=3.10; 3.10.0rc1 Requires-Python >=3.10; 3.10.1 Requires-Python >=3.10; 3.10.3 Requires-Python >=3.10; 3.3 Requires-Python >=3.10; 3.3rc0 Requires-Python >=3.10; 3.4 Requires-Python >=3.10; 3.4.1 Requires-Python >=3.10; 3.4.2 Requires-Python >=3.10; 3.4rc0 Requires-Python >=3.10; 3.5rc0 Requires-Python >=3.11; 5.0.0 Requires-Python >=3.10; 5.0.0b1 Requires-Python >=3.10; 5.0.0b10 Requires-Python >=3.10; 5.0.0b5 Requires-Python >=3.10; 5.0.0b6 Requires-Python >=3.10; 5.0.0b7 Requires-Python >=3.10; 5.0.0b8 Requires-Python >=3.10; 5.0.0b9 Requires-Python >=3.10; 5.0.1 Requires-Python >=3.10; 5.0.2 Requires-Python >=3.10; 5.1.0 Requires-Python >=3.10; 5.10.0 Requires-Python >=3.10; 5.11.0 Requires-Python >=3.10; 5.12.0 Requires-Python >=3.10; 5.13.0 Requires-Python >=3.10; 5.13.1 Requires-Python >=3.10; 5.13.2 Requires-Python >=3.10; 5.14.0 Requires-Python >=3.10; 5.15.0 Requires-Python >=3.10; 5.16.0 Requires-Python >=3.10; 5.16.1 Requires-Python >=3.10; 5.16.2 Requires-Python >=3.10; 5.17.0 Requires-Python >=3.10; 5.17.1 Requires-Python >=3.10; 5.18.0 Requires-Python >=3.10; 5.19.0 Requires-Python >=3.10; 5.20.0 Requires-Python >=3.10; 5.20.1 Requires-Python >=3.10; 5.21.0 Requires-Python >=3.10; 5.22.0 Requires-Python >=3.10; 5.23.0 Requires-Python >=3.10; 5.23.1 Requires-Python >=3.10; 5.23.2 Requires-Python >=3.10; 5.23.3 Requires-Python >=3.10; 5.24.0 Requires-Python >=3.10; 5.25.0 Requires-Python >=3.10; 5.25.1 Requires-Python >=3.10; 5.25.2 Requires-Python >=3.10; 5.26.0 Requires-Python >=3.10; 5.27.0 Requires-Python >=3.10; 5.27.1 Requires-Python >=3.10; 5.28.0 Requires-Python >=3.10; 5.29.0 Requires-Python >=3.10; 5.3.0 Requires-Python >=3.10; 5.4.0 Requires-Python >=3.10; 5.5.0 Requires-Python >=3.10; 5.6.0 Requires-Python >=3.10; 5.7.0 Requires-Python >=3.10; 5.7.1 Requires-Python >=3.10; 5.8.0 Requires-Python >=3.10; 5.9.0 Requires-Python >=3.10; 5.9.1 Requires-Python >=3.10; 8.2.0 Requires-Python >=3.10
ERROR: Could not find a version that satisfies the requirement torch==2.3.1+cu118 (from versions: 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.7.0)
ERROR: No matching distribution found for torch==2.3.1+cu118
I followed the other method from README and also encountered issues. Here's the working installation procedure:
- Clone repository (use HTTPS or SSH) and go to the directory
git clone [https://github.com/open-mmlab/PowerPaint...](https://github.com/open-mmlab/PowerPaint.git)
cd PowerPaint
git checkout main # Ensure you're on the main branch
- Create and set up environment with Python 3.9:
conda create --name ppt python=3.9
conda activate ppt
- pip install -r requirements/requirements.txt
pip install huggingface_hub==0.25.0 (Fixes ImportError: cannot import name 'cached_download' from 'huggingface_hub')
pip install gradio==3.43.0 (fixes Error in gradio mask area)
- Set up Git LFS and download model
conda install git-lfs
git lfs install
git lfs clone https://huggingface.co/JunhaoZhuang/PowerPaint_v2/ ./checkpoints/ppt-v2
- Fix model file structure When you try to run demo with
python app.py --share --version ppt-v2 --checkpoint_dir checkpoints/ppt-v2 --local_files_only
you get error like this:
OSError: Error no file named diffusion_pytorch_model.bin found in directory checkpoints/ppt-v2/realisticVisionV60B1_v51VAE/unet
So fixed this with:
cd checkpoints/ppt-v2/realisticVisionV60B1_v51VAE/unet
ln -s diffusion_pytorch_model-002.bin diffusion_pytorch_model.bin
- And than you can finally run the demo and enjoy:
python app.py --share --version ppt-v2 --checkpoint_dir checkpoints/ppt-v2 --local_files_only
Suggestions • Please fix installation readme or check the points above to make it more user-friendly. • Mention, that you need to checkout to 'main' to be ok • I think about 70% of issues are about installation. If you make the points above well-guided, it will be much easier to use PowerPaint
I enjoy your work and want others can do same :)
git checkout main # Ensure you're on the main branch It help me , the origin git clone code is different
A fork with bunch of these fix and the Dockerfile, docker-compose, so that you can run the project in one command:
https://github.com/davideuler/PowerPaint
Thank you for the fixes. However, when I follow the steps I get an error: OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.
Can you tell me where I am going wrong here? The whole error stack is as follows:
/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1142: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py", line 380, in load_config
config_file = hf_hub_download(
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f
return f(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1232, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1339, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1848, in _raise_on_head_call_error
raise LocalEntryNotFoundError(
huggingface_hub.errors.LocalEntryNotFoundError: Cannot find the requested files in the disk cache and outgoing traffic has been disabled. To enable hf.co look-ups and downloads online, set 'local_files_only' to False.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/netscratch/siraj/PowerPaint2/PowerPaint/app.py", line 560, in <module>
controller = PowerPaintController(weight_dtype, args.checkpoint_dir, args.local_files_only, args.version)
File "/netscratch/siraj/PowerPaint2/PowerPaint/app.py", line 141, in __init__
unet = UNet2DConditionModel.from_pretrained(
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 567, in from_pretrained
config, unused_kwargs, commit_hash = cls.load_config(
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py", line 406, in load_config
raise EnvironmentError(
OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.
Thank you for the fixes. However, when I follow the steps I get an error: OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.
Can you tell me where I am going wrong here? The whole error stack is as follows:
/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1142: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`. warnings.warn( Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py", line 380, in load_config config_file = hf_hub_download( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f return f(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1232, in hf_hub_download return _hf_hub_download_to_cache_dir( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1339, in _hf_hub_download_to_cache_dir _raise_on_head_call_error(head_call_error, force_download, local_files_only) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1848, in _raise_on_head_call_error raise LocalEntryNotFoundError( huggingface_hub.errors.LocalEntryNotFoundError: Cannot find the requested files in the disk cache and outgoing traffic has been disabled. To enable hf.co look-ups and downloads online, set 'local_files_only' to False. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/netscratch/siraj/PowerPaint2/PowerPaint/app.py", line 560, in <module> controller = PowerPaintController(weight_dtype, args.checkpoint_dir, args.local_files_only, args.version) File "/netscratch/siraj/PowerPaint2/PowerPaint/app.py", line 141, in __init__ unet = UNet2DConditionModel.from_pretrained( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 567, in from_pretrained config, unused_kwargs, commit_hash = cls.load_config( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py", line 406, in load_config raise EnvironmentError( OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.
I think it might be related to the Transformers or Diffusers version. Could you try changing it and checking if the error persists?
感谢您的修复。但是,当我按照这些步骤作时,我收到一个错误:OSError:runwayml/stable-diffusion-v1-5 似乎没有名为 config.json 的文件。 你能告诉我我哪里出了问题吗?整个错误堆栈如下:
/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1142: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`. warnings.warn( Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py", line 380, in load_config config_file = hf_hub_download( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f return f(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1232, in hf_hub_download return _hf_hub_download_to_cache_dir( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1339, in _hf_hub_download_to_cache_dir _raise_on_head_call_error(head_call_error, force_download, local_files_only) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1848, in _raise_on_head_call_error raise LocalEntryNotFoundError( huggingface_hub.errors.LocalEntryNotFoundError: Cannot find the requested files in the disk cache and outgoing traffic has been disabled. To enable hf.co look-ups and downloads online, set 'local_files_only' to False. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/netscratch/siraj/PowerPaint2/PowerPaint/app.py", line 560, in <module> controller = PowerPaintController(weight_dtype, args.checkpoint_dir, args.local_files_only, args.version) File "/netscratch/siraj/PowerPaint2/PowerPaint/app.py", line 141, in __init__ unet = UNet2DConditionModel.from_pretrained( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 567, in from_pretrained config, unused_kwargs, commit_hash = cls.load_config( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py", line 406, in load_config raise EnvironmentError( OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.我认为这可能与变形金刚或扩散器版本有关。您能尝试更改它并检查错误是否仍然存在吗?
me too