danielroich / PTI

Official Implementation for "Pivotal Tuning for Latent-based editing of Real Images" (ACM TOG 2022) https://arxiv.org/abs/2106.05744
MIT License
897 stars 112 forks source link

This needs updating with readme #28

Closed johndpope closed 8 months ago

johndpope commented 3 years ago

https://github.com/danielroich/PTI/blob/7da3f22f8077c6930afa13186e3f80dcf734779b/models/StyleCLIP/optimization/run_optimization.py#L29

danielroich commented 3 years ago

Thanks! :) Will be updated

johndpope commented 2 years ago

I maybe doing something wrong and or tied / but when I point the python optimization/run_optimization.py code at a presaved PTI pytorch latent it seems to be getting the e4e ??? That would only make sense if the embeddings were saving to wrong directory....??

e4e python optimization/run_optimization.py --latent_path=/home/jp/Documents/gitWorkspace/e4e/embeddings/images/e4e/1/0.pt --description "drug fiend" 00020

PTI python optimization/run_optimization.py --latent_path=/home/jp/Documents/gitWorkspace/PTI/embeddings/images/PTI/1/0.pt --description "drug fiend"

00000

SG2_plus python optimization/run_optimization.py --latent_path=/home/jp/Documents/gitWorkspace/PTI/embeddings/images/SG2_plus/1/0.pt --description "drug fiend"

00000

Andy010902 commented 8 months ago

@johndpope Hi, I need your help! When I do "python run_optimization.py" in the directory "./optimization",I get "error: cann't import name 'ensure_checkpoint_exists' from 'StyleCLIP.global_directions.utils' (./utils/init.py)", then I search for 'ensure_checkpoint_exists' in the entire project, then all about it are located in './run_optimization.py'. And there is nothing in ./models/StyleCLIP/global_dirctions/utils/init.py

So, I just wonder if there are something lost in the github.

johndpope commented 8 months ago

sorry Andy, when nvidia-labs abandoned tensorflow in favour of pytorch - I no longer work with tensorflow.

Doing a search for that specific function name on github - returns many results. - https://github.com/search?q=ensure_checkpoint_exists+styleclip&type=code

I would abandon this repo for one in favour of torch / see results above. you can see in requirements