-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ComfyUI example * fix name
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# ComfyUI | ||
|
||
[ComfyUI](https://github.com/comfyanonymous/ComfyUI.git) is a powerful and modular stable diffusion GUI and backend that let you design and execute advanced stable diffusion pipelines using a graph/nodes/flowchart based interface. | ||
|
||
## Install Lepton sdk | ||
```shell | ||
pip install leptonai | ||
``` | ||
|
||
## Launch Stable Diffusion web UI in the cloud | ||
|
||
Similar to other examples, you can run ComfyUI on Lepton Cloud Platform easily, e.g.: | ||
|
||
```shell | ||
lep photon create -n comfyui -m photon.py | ||
lep photon push -n comfyui | ||
lep photon run \ | ||
-n comfyui \ | ||
--resource-shape gpu.a10 | ||
--public | ||
``` | ||
|
||
You can visit [dashboard.lepton.ai](https://dashboard.lepton.ai/) to use the web Dashboard, or use `lep` cli to manage the launched deployment: | ||
```shell | ||
lep deployment status -n comfyui | ||
``` | ||
|
||
## Client | ||
|
||
Once the ComfyUI server is up, you can copy the deployment url shown on the Lepton Dashboard (or in the `lep` cli output) | ||
|
||
<img src="assets/deployment.png" width=1024> | ||
|
||
and visit it in the web browser. e.g. running the sdxl + svd models to do text to video: | ||
|
||
<img src="assets/browser.png" width=1024> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from leptonai.photon import Photon | ||
|
||
|
||
class ComfyUI(Photon): | ||
comfyui_version = "329c571" | ||
cmd = [ | ||
"bash", | ||
"-c", | ||
( | ||
"pip install aiohttp einops torchsde &&" | ||
"git clone --recursive https://github.com/comfyanonymous/ComfyUI.git && cd" | ||
f" ComfyUI && git checkout {comfyui_version} && python main.py --listen" | ||
" 0.0.0.0 --port 8080" | ||
), | ||
] | ||
deployment_template = { | ||
"resource_shape": "gpu.a10", | ||
} |