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

Optional Accelerate Launch #4527

Merged
merged 2 commits into from
Nov 19, 2022
Merged

Conversation

d8ahazard
Copy link
Collaborator

Add option to export ACCELERATE="True", which will in turn cause the application to be launched via accelerate launch, versus python.

@dathide
Copy link

dathide commented Nov 11, 2022

I would like this

@papuSpartan
Copy link
Contributor

What is the benefit to having accelerate launch SDWUI right now? Wouldn't the functions required by Accelerate need to be implemented?

ie.

We are under the presumption that training_dataloader, model, optimizer, scheduler, and loss_function have been defined beforehand.

@ArrowM
Copy link
Contributor

ArrowM commented Nov 16, 2022

I pulled this and added set ACCELERATE=True in my webui-user.bat, but it didn't run the accelerate block in webui.bat. Is there possibly something wrong with this line?
if [%ACCELERATE%] == ["True"] goto :accelerate (webui.bat:31)

@d8ahazard
Copy link
Collaborator Author

I pulled this and added set ACCELERATE=True in my webui-user.bat, but it didn't run the accelerate block in webui.bat. Is there possibly something wrong with this line? if [%ACCELERATE%] == ["True"] goto :accelerate (webui.bat:31)

Put "True" into quotes in your bat file. You'll also need to have restarted the app 2x, once to install the new requirements (accelerate), and again for the bat to find it in venv and run the accelerate launch command.

@d8ahazard
Copy link
Collaborator Author

What is the benefit to having accelerate launch SDWUI right now? Wouldn't the functions required by Accelerate need to be implemented?

ie.

We are under the presumption that training_dataloader, model, optimizer, scheduler, and loss_function have been defined beforehand.

Perhaps an extension (like dreambooth) wants to utilize accelerate without having to make the user add a whole new script to launch the app properly. ;)

@AUTOMATIC1111 AUTOMATIC1111 merged commit 0d098e4 into AUTOMATIC1111:master Nov 19, 2022
@Jonseed
Copy link

Jonseed commented Nov 19, 2022

What does accelerating the launch do?

@TripleKiller666
Copy link

What does accelerating the launch do?

you can read more about it here:
https://huggingface.co/docs/accelerate/index

@nawwman
Copy link

nawwman commented Nov 21, 2022

What does accelerating the launch do?

you can read more about it here: https://huggingface.co/docs/accelerate/index

Could you simplify it for laymen, what does it do exactly? Some kind of parallelizing of tasks to potentially increase speed of image generation in batches?

@zono50
Copy link

zono50 commented Jan 19, 2023

Is it possible to accelerate launch using the linux version as well? can we stick if [%ACCELERATE%] == ["True"] goto :accelerate (webui.sh:31) into our sh file as well? I see the command in the webui.sh file to export accelerate="true" but i get an error when I uncomment it.

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

Successfully merging this pull request may close these issues.

9 participants