mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add more step-by-step documentation and links
This commit is contained in:
parent
ef68a419f1
commit
3caa95ced9
@ -6,10 +6,10 @@
|
|||||||
# and the width and height of the images it
|
# and the width and height of the images it
|
||||||
# was trained on.
|
# was trained on.
|
||||||
stable-diffusion-1.4:
|
stable-diffusion-1.4:
|
||||||
config: configs/stable-diffusion/v1-inference.yaml
|
config: ./configs/stable-diffusion/v1-inference.yaml
|
||||||
weights: models/ldm/stable-diffusion-v1/model.ckpt
|
weights: ./models/ldm/stable-diffusion-v1/sd-v1-4.ckpt
|
||||||
vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
vae: ./models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
||||||
description: Stable Diffusion inference model version 1.4
|
description: The original Stable Diffusion version 1.4 weight file (4.27 GB)
|
||||||
width: 512
|
width: 512
|
||||||
height: 512
|
height: 512
|
||||||
stable-diffusion-1.5:
|
stable-diffusion-1.5:
|
||||||
|
@ -93,6 +93,22 @@ and other large models that are needed for text to image generation. At any poin
|
|||||||
this program and resume later.\n'''
|
this program and resume later.\n'''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#--------------------------------------------
|
||||||
|
def postscript():
|
||||||
|
print(
|
||||||
|
'''You're all set! You may now launch InvokeAI using one of these two commands:
|
||||||
|
Web version:
|
||||||
|
|
||||||
|
python scripts/invoke.py --web (connect to http://localhost:9090)
|
||||||
|
|
||||||
|
Command-line version:
|
||||||
|
|
||||||
|
python scripts/invoke.py
|
||||||
|
|
||||||
|
Have fun!
|
||||||
|
'''
|
||||||
|
)
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def yes_or_no(prompt:str, default_yes=True):
|
def yes_or_no(prompt:str, default_yes=True):
|
||||||
default = "y" if default_yes else 'n'
|
default = "y" if default_yes else 'n'
|
||||||
@ -144,19 +160,43 @@ will be given the option to view and change your selections.
|
|||||||
#-------------------------------Authenticate against Hugging Face
|
#-------------------------------Authenticate against Hugging Face
|
||||||
def authenticate():
|
def authenticate():
|
||||||
print('''
|
print('''
|
||||||
To download the Stable Diffusion weight files you need to read and accept the
|
To download the Stable Diffusion weight files from the official Hugging Face
|
||||||
CreativeML Responsible AI license. If you have not already done so, please
|
repository, you need to read and accept the CreativeML Responsible AI license.
|
||||||
create an account at https://huggingface.co. Then login under your account and
|
|
||||||
read and accept the license available at https://huggingface.co/CompVis/stable-diffusion-v-1-4-original.
|
This involves a few easy steps.
|
||||||
|
|
||||||
|
1. If you have not already done so, create an account on Hugging Face's web site
|
||||||
|
using the "Sign Up" button:
|
||||||
|
|
||||||
|
https://huggingface.co/join
|
||||||
|
|
||||||
|
You will need to verify your email address as part of the HuggingFace
|
||||||
|
registration process.
|
||||||
|
|
||||||
|
2. Log into your account Hugging Face:
|
||||||
|
|
||||||
|
https://huggingface.co/login
|
||||||
|
|
||||||
|
3. Accept the license terms located here:
|
||||||
|
|
||||||
|
https://huggingface.co/CompVis/stable-diffusion-v-1-4-original
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
input('Press <enter> when you are ready to continue:')
|
input('Press <enter> when you are ready to continue:')
|
||||||
access_token = HfFolder.get_token()
|
access_token = HfFolder.get_token()
|
||||||
if access_token is None:
|
if access_token is None:
|
||||||
print('''
|
print('''
|
||||||
Thank you! Now you need to authenticate with your HuggingFace access token.
|
4. Thank you! The last step is to enter your HuggingFace access token so that
|
||||||
Go to https://huggingface.co/settings/tokens and create a token. Copy it to the
|
this script is authorized to initiate the download. Go to the access tokens
|
||||||
clipboard and paste it here: '''
|
page of your Hugging Face account and create a token by clicking the
|
||||||
|
"New token" button:
|
||||||
|
|
||||||
|
https://huggingface.co/settings/tokens
|
||||||
|
|
||||||
|
(You can enter anything you like in the token creation field marked "Name".
|
||||||
|
"Role" should be "read").
|
||||||
|
|
||||||
|
Now copy the token to your clipboard and paste it here: '''
|
||||||
)
|
)
|
||||||
access_token = getpass.getpass()
|
access_token = getpass.getpass()
|
||||||
HfFolder.save_token(access_token)
|
HfFolder.save_token(access_token)
|
||||||
@ -391,21 +431,30 @@ def download_safety_checker():
|
|||||||
|
|
||||||
#-------------------------------------
|
#-------------------------------------
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
introduction()
|
try:
|
||||||
if user_wants_to_download_weights():
|
introduction()
|
||||||
models = select_datasets()
|
print('** WEIGHT SELECTION **')
|
||||||
if models is None:
|
if user_wants_to_download_weights():
|
||||||
if yes_or_no('Quit?',default_yes=False):
|
models = select_datasets()
|
||||||
sys.exit(0)
|
if models is None:
|
||||||
access_token = authenticate()
|
if yes_or_no('Quit?',default_yes=False):
|
||||||
successfully_downloaded = download_weight_datasets(models, access_token)
|
sys.exit(0)
|
||||||
update_config_file(successfully_downloaded)
|
print('** LICENSE AGREEMENT FOR WEIGHT FILES **')
|
||||||
download_bert()
|
access_token = authenticate()
|
||||||
download_kornia()
|
print('\n** DOWNLOADING WEIGHTS **')
|
||||||
download_clip()
|
successfully_downloaded = download_weight_datasets(models, access_token)
|
||||||
download_gfpgan()
|
update_config_file(successfully_downloaded)
|
||||||
download_codeformer()
|
print('\n** DOWNLOADING SUPPORT MODELS **')
|
||||||
download_clipseg()
|
download_bert()
|
||||||
download_safety_checker()
|
download_kornia()
|
||||||
|
download_clip()
|
||||||
|
download_gfpgan()
|
||||||
|
download_codeformer()
|
||||||
|
download_clipseg()
|
||||||
|
download_safety_checker()
|
||||||
|
postscript()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\nGoodbye! Come back soon.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user