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

Filesystem paths in Automatic API Error responses #36

Open
pwalski opened this issue Jan 16, 2024 · 1 comment
Open

Filesystem paths in Automatic API Error responses #36

pwalski opened this issue Jan 16, 2024 · 1 comment

Comments

@pwalski
Copy link
Contributor

pwalski commented Jan 16, 2024

In case of misconfigured model Automatic API returns error response including host filesystem paths:

{
'error': 'FileNotFoundError', 
'detail': '', 'body': '',
'errors': "No checkpoints found. When searching for checkpoints, looked at:\n - file D:\\Code\\gamerhash-facade\\modules\\plugins\\automatic\\webui\\sd_xl_base_1.0_92180a67d096be309c5e6a7146d89aac4ef900e2bf48a52ea569df7d.safetensors\n - directory D:\\Code\\gamerhash-facade\\modules\\plugins\\automatic\\webui\\models\\Stable-diffusion\n - directory D:\\Code\\gamerhash-facade\\modules\\plugins\\automatic\\webui\\Code\\gamerhash-facade\\modules\\golem-data\\provider\\exe-unit\\cacheCan't run without a checkpoint. Find and place a .ckpt or .safetensors file into any of those locations."
}
@pwalski pwalski changed the title Filesystem paths in Automatic API responses Filesystem paths in Automatic API Error responses Jan 16, 2024
@pwalski
Copy link
Contributor Author

pwalski commented Jan 18, 2024

This task and recent discussion about OCI support was an excuse to check how Automatic could be started on Windows in an isolated environment.

There is a Windows fork of runc (low level lib for running OCI containers) called runhcs.
https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/containerd#runhcs
It supports both Hyper-V virtualization and Windows Process Containers.
Hyper-V is disabled by default, so it is not an option.
Process isolation allows to hide fs, network, and obviously process space.
https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container#process-isolation
It also allows to share devices (GPU)
https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/hardware-devices-in-containers#what-devices-are-supported
I know there is a nvidia-container-runtime allowing to use GPU on containers on Windows, but I think it is required for containerd runtime (so docker, k8s, etc.) to support GPU on linux containers.
It seems it is possible to just run runhcs in a directory with config.json OCI container descriptor to start a container (without requirement to install and start any daemon as in case of containerd/docker).
It could be worth to check if it will be possible to start this way Automatic in container with Windows baseimage and whether it will be able to access GPU.

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

No branches or pull requests

1 participant