From e69f543716b9bfb72059fc8472e5ff2d5c4ed3ba Mon Sep 17 00:00:00 2001 From: Charles Frye Date: Mon, 16 Sep 2024 22:46:26 -0700 Subject: [PATCH] minor fixes for comfyUI example (#876) --- 06_gpu_and_ml/comfyui/comfyapp.py | 6 ++---- 06_gpu_and_ml/comfyui/comfyclient.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/06_gpu_and_ml/comfyui/comfyapp.py b/06_gpu_and_ml/comfyui/comfyapp.py index 9ce3d47cb..af4d424b0 100644 --- a/06_gpu_and_ml/comfyui/comfyapp.py +++ b/06_gpu_and_ml/comfyui/comfyapp.py @@ -36,15 +36,14 @@ # # 2. In another terminal, run inference: # ```bash -# python 06_gpu_and_ml/comfyui/comfyclient.py --dev --modal-workspace your-modal-workspace --prompt "your prompt here" +# python 06_gpu_and_ml/comfyui/comfyclient.py --dev --modal-workspace $(modal profile current) --prompt "neon green sign that says Modal" # ``` -# You can find your Modal workspace name by running `modal profile current`. # # The first inference will take ~1m since the container needs to launch the ComfyUI server and load Flux into memory. Successive inferences on a warm container should take a few seconds. # # ## Setup # -# First, we define the environment we need to run ComfyUI using [comfy-cli](https://github.com/Comfy-Org/comfy-cli). This handy tool manages the installation of ComfyUI, its dependencies, models, and custom nodes. +# First, we define the environment we need to run ComfyUI using [`comfy-cli`](https://github.com/Comfy-Org/comfy-cli). This handy tool manages the installation of ComfyUI, its dependencies, models, and custom nodes. import json @@ -173,7 +172,6 @@ def api(self, item: Dict): # When you run this script with `modal deploy 06_gpu_and_ml/comfyui/comfyapp.py`, you'll see a link that includes `ui`. # Head there to interactively develop your ComfyUI workflow. All of your models and custom nodes specified in the image build step will be loaded in. # -# # To serve the workflow after you've developed it, first export it as "API Format" JSON: # 1. Click the gear icon in the top-right corner of the menu # 2. Select "Enable Dev mode Options" diff --git a/06_gpu_and_ml/comfyui/comfyclient.py b/06_gpu_and_ml/comfyui/comfyclient.py index 463cf34fb..4e3d07d45 100644 --- a/06_gpu_and_ml/comfyui/comfyclient.py +++ b/06_gpu_and_ml/comfyui/comfyclient.py @@ -50,7 +50,7 @@ def parse_args(arglist: list[str]) -> argparse.Namespace: "--prompt", type=str, required=True, - help="what to draw in the blank part of the image", + help="Prompt for the image generation model.", ) parser.add_argument( "--dev",