Stable Diffusion Web UI - Scheduling Spaces - A10G Small

Yeah, so @camenduru based on this I should have easily been able to have 15.4 gb of checkpoints and been just fine on the T4 Medium or A10g small, right?

Once the Amazon EKS Distro is available I’ll have to rebuild my entire space or what?

Thanks!

Appreciate all of your assistance.

1 Like

Yeah, the plan is inside of an organization.

However, I want to embed the space as an iframe or use it as a webcomponent so making the space private isn’t ideal/feasible.

Using gradio auth/env secrets will allow me to have the organization / space be public and still not allow the space to be started by the public running up a large HF bill.

Now to figure this out with the example from @Omnibus

Thanks!

this is T4 small I optimized 71G to 58G :partying_face: I will optimize more
with this you can add 40G models like 8 models if each is 5GB to T4 small

Screenshot 2023-02-14 064753
Screenshot 2023-02-14 071716

Once the Amazon EKS Distro is available I’ll have to rebuild my entire space or what?

nope, you will gain root access at runtime

1 Like

Amazing, I will see these changes to the Dockerfile at a factory reboot?

How long does it take to go from sleeping space to awake on T4 Med or A10g small for you?

Thank you again, @camenduru

Hmm, this seems like it should work @Omnibus but the space simply loads without asking for a password.

Any thoughts?

Thanks!

you should copy paste into your docker from camenduru/webui-docker at main

and awake for T4 small 1 minute 35 seconds

1 Like

On T4 small you actually are limited in storage to 50G at runtime and 110G for A10G small, you can find the available disk at runtime by flavor here.

Depending on the size of your image though the available storage could be less (but in any case you cannot have more).

@iamrobotbear yes 15.4 GB checkpoints should be able to fit on A10G small and T4 medium, but the image need to be optimized.
In the current state the following two lines at the end of the Dockerfile:

RUN chown -R user:user /content
RUN chmod -R 777 /content

Effectively both increase your image size by at least the size of your checkpoints (so at least about 30GB)

@iamrobotbear I recreated a PR on your Space: iamrobotbear/webui-docker · Optimize Docker image size
I duplicated the base space camenduru/webui-docker and added the same changes and was able to run it on a T4 small.
Made the same suggestion on camenduru’s space.

1 Like

@chris-rannou I merged your PR and built on T4 Medium with all 3 Checkpoints (15.4gb). How quickly are you seeing this start?

@camenduru - thoughts on the optimizations?

Thanks!

cool optimization :fire: 58G to 50G we saved an extra 8GB :partying_face:

Screenshot 2023-02-14 141903

Filesystem      Size  Used Avail Use% Mounted on
overlay         200G   96G  105G  48% /
tmpfs            64M     0   64M   0% /dev
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p1  200G   96G  105G  48% /etc/hosts
shm              64M  4.0K   64M   1% /dev/shm
tmpfs            16G   12K   16G   1% /proc/driver/nvidia
tmpfs            16G     0   16G   0% /proc/acpi
tmpfs            16G     0   16G   0% /sys/firmware

This is what I have for T4 Medium

interesting 96G :roll_eyes: it should be around 65G you have only 3 models :thinking:

@camenduru Do you plan on integrating @chris-rannou’s optimizations?

I don’t understand how I have such different wake/build/file size usage than you do.

Filesystem      Size  Used Avail Use% Mounted on
overlay         200G   65G  136G  33% /
tmpfs            64M     0   64M   0% /dev
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p1  200G   65G  136G  33% /etc/hosts
shm              64M  4.0K   64M   1% /dev/shm
tmpfs            16G   12K   16G   1% /proc/driver/nvidia
tmpfs            16G     0   16G   0% /proc/acpi
tmpfs            16G     0   16G   0% /sys/firmware

Here’s mine on T4 Medium with just Openjourney v2 using the PR from @chris-rannou

yes thanks to @chris-rannou :heart: teaching me I will optimize all my dockers

2 Likes

@camenduru Is the current T4 Private file based on @chris-rannou’s optimizations or should I expect to need to update?

@chris-rannou am I showing 200gb for my space as the total size because at one point my space was an A10g large?

Thanks!

I found one line of the code no work for me in a10g large and the solution was replace the line 17 that install xformers with RUN pip install xformers
@camenduru

2 Likes