Skip to content

Generative AI Full Course Lecture 8 How ComfyUI Custom Nodes Work Read a Node Packs Code

FurkanGozukara edited this page Nov 16, 2026 · 1 revision

Generative AI Full Course - Lecture 8: How ComfyUI Custom Nodes Work - Read a Node Pack's Code

Generative AI Full Course - Lecture 8: How ComfyUI Custom Nodes Work - Read a Node Pack's Code

image Hits Patreon BuyMeACoffee Furkan Gözükara Medium Codio Furkan Gözükara Medium

YouTube Channel Furkan Gözükara LinkedIn Udemy Twitter Follow Furkan Gözükara

Turn a ComfyUI workflow that grew over seven lectures into something you can reuse, share, automate and repair. Package part of a 67-node graph as a subgraph blueprint, run only what changed, build an App Mode form, export the API JSON and drive ComfyUI from Python, read a real custom node pack, triage a pack's code before you trust it and recover a broken install in an isolated copy. Nothing new is generated: this lecture engineers what you already have.

🔗 Links:

Windows AI requirements guide: [ https://www.patreon.com/posts/111553210 ]

📦 Full course resource repository: [ https://github.com/FurkanGozukara/Generative-AI-Tools-And-Tecniques-2026-2027-Fall ]

📺 Full course playlist: [ https://www.youtube.com/playlist?list=PLUMEJUep1hiI ]

Comfy Registry standards: [ https://docs.comfy.org/registry/standards ]

Comfy Python SDK: [ https://github.com/Comfy-Org/comfy-python-sdk ]

SECourses Discord: [ https://discord.com/invite/software-engineering-courses-secourses-772774097734074388 ]

🎯 Update ComfyUI with git pull and pip install -r requirements.txt in its venv, read each node's cnr_id and ver in Properties, turn an upscale chain into a subgraph with Edit Subgraph Widgets and named slots, publish it as a blueprint and drag in a fresh instance. Run one branch with Execute to selected output nodes, bypass a LoRA (Ctrl+B), mute a saver (Ctrl+M) and watch the cache skip unchanged nodes; build an App Mode form, run it, narrow the window, export it and read its linearData inputs and outputs.

🐍 Export the API JSON and follow a [node_id, output_index] link, then read the standard-library Python client before running it: how JSON becomes a dictionary, the checks that refuse a wrong node ID, the one-line prompt substitution and the /prompt, /history and /view routes. Dry run, one real job, its record folder and image, execution_cached and /object_info; pip lists comfy-sdk 0.5.0; a three-prompt queue with one cancellation and the code that labels completed, failed, cancelled and unknown jobs.

🔍 Read the Inpaint Crop and Stitch pack (mappings, one node's INPUT_TYPES, RETURN_TYPES, FUNCTION and CATEGORY, pyproject.toml), one of its tests and its Registry releases (3.0.20 newest, 3.0.17 installed). Triage the Impact Pack: subprocess, eval, exec, environment variables and network calls, a Hugging Face model download the text search misses, unpinned requirements with a git dependency, and certutil's SHA256 of the model its installer fetches.

🛟 Record the commit and a pip freeze lock file, save a ComfyUI-Manager snapshot with cm-cli and compare the two, raise security_level to strong, read the start-up log's Import times list, start an isolated copy with --disable-all-custom-nodes, then bring back one pack with --whitelist-custom-nodes; compare Colab's /content/ComfyUI with extra_model_paths.yaml.

✅ Before you trust a workflow or a node pack: keep a snapshot and a lock file, check advice against the live /object_info schema, read a pack's code before installing it, test updates in an isolated copy and check a job ID in the history before resubmitting it.

🧩 Subgraphs and blueprints, partial execution, bypass and mute, the execution cache, App Mode, API JSON, POST /prompt, /history, /object_info, Comfy API v2, custom node anatomy, supply-chain triage, ComfyUI-Manager security levels, --disable-all-custom-nodes, isolated test copies and environment roots.

Use the chapters to jump to each technique, script and recovery step.

⏱️ Chapters:

00:00:00 Seven lectures of nodes: what this lecture fixes

00:00:47 Update ComfyUI and start the server

00:01:33 Four questions about a sixty-seven node graph

00:02:27 Package the upscale chain as a subgraph

00:04:28 Run less: partial execution, bypass, mute and the cache

00:05:52 Turn a workflow into an app form

00:08:22 Export the API format and read it

00:09:34 Drive ComfyUI from Python: a dry run and one real job

00:13:43 A small queue: three prompts and one cancellation

00:15:35 Live schemas beat stale advice

00:17:25 Supply-chain triage: what a node pack can do

00:22:04 Read the log, then recover through isolation

00:25:04 Recap and next lecture

Course files for this lecture: the workflows, the API export, the inspector, client and queue scripts, and every command line used on camera. The next lecture trains our own LoRA; in Lecture 10, video workflows make subgraphs and partial execution necessary, and Lecture 14's final pipeline reuses today's snapshot, dependency record and API script.

💬 Ask in the comments or Discord, and see the pinned comment. Support SECourses on Patreon for more guides and resources.

#ComfyUI #ComfyUIAPI #CustomNodes

Video Transcription

  • 00:00:08 Greetings everyone. Today we take a workflow that  grew over 7 lectures and make it something you  

  • 00:00:14 can reuse, share, automate and repair. Nothing  new gets generated; we engineer what we already  

  • 00:00:20 have. This is that workflow: 67 nodes, crossing  wires, 2 copies of the same upscale chain and  

  • 00:00:28 3 experiments switched off. It still works, but  in 6 months nobody could maintain it. Check out  

  • 00:00:34 the tutorial description to see the chapters.  We update ComfyUI, package part of this graph,  

  • 00:00:39 build a simple app form, drive ComfyUI from  Python, read a real node pack and plan a  

  • 00:00:45 safe recovery. First, the update routine  from Lecture 2. Open the ComfyUI folder,  

  • 00:00:51 type cmd in its address bar and press Enter, then  activate the environment of this installation.  

  • 00:01:00 Pull the latest code, then install its  requirements in the same environment. Keep  

  • 00:01:05 the output visible until the prompt returns;  a red error line would need attention before  

  • 00:01:10 we continue. Through this Python, pip installs  into the environment, exactly the packages that  

  • 00:01:16 the requirements file lists. Close the prompt and  double-click the launch file we made last lecture.  

  • 00:01:23 The console starts the updated server at port  8189; refresh the browser page so it loads the  

  • 00:01:30 new interface as well. Look at this graph  as an engineer and ask 4 questions. First:  

  • 00:01:36 which part do I actually reuse? This upscale chain  runs after almost every image, and a second copy  

  • 00:01:42 of it sits down here. Second: which node pack  does each node come from, and at what version?  

  • 00:01:49 Right-click the FaceDetailer and open Properties.  The cnr_id field names its pack, the Impact Pack,  

  • 00:01:55 and ver records version 8.28.3. A core node shows  comfy-core and the ComfyUI version it was added  

  • 00:02:03 with. Nodes from templates and shared workflows  carry these 2 fields, so the file itself tells  

  • 00:02:09 you what it needs. Question 3: if it breaks after  an update, how do I find out why? And question 4:  

  • 00:02:16 how do I run it 100 times without clicking?  Today's lecture answers all 4 with ordinary  

  • 00:02:22 software habits: modules, versions, automation  and recovery. Let's answer the first question,  

  • 00:02:28 and zoom in on the upscale chain until its titles  are readable. Select the 3 nodes of the chain:  

  • 00:02:34 the upscale model loader, the upscale with the  model and the final resize. Then click Convert  

  • 00:02:40 Selection to Subgraph. The 3 nodes collapse into  1 node. ComfyUI found every wire that crosses the  

  • 00:02:49 border of the selection and turned each one into  an input or an output of the subgraph. Now design  

  • 00:02:56 its interface. Click Edit Subgraph Widgets.  The panel lists the parameters hidden inside;  

  • 00:03:02 show only the 3 a user should change: the upscale  model, the width and the height. The resize method  

  • 00:03:12 and the crop stay hidden. A good subgraph exposes  a few meaningful knobs, not every setting inside  

  • 00:03:18 it. Give it a clear name too: click the pencil  beside the title and type upscale and resize.  

  • 00:03:26 Double-click the node to step inside. The input  node on the left and the output node on the right  

  • 00:03:31 are the interface, and the 3 original nodes  keep all their connections. Press Escape to  

  • 00:03:38 go back up. Inside nested groups, an error points  to its location as a chain of numbers, like 1:2:3;  

  • 00:03:45 each number is 1 level of nesting. The outputs  still have generic names. Right-click the first  

  • 00:03:52 output dot and choose Rename Slot, then type 4x  image. Rename the second one to final image. Now  

  • 00:03:58 anyone reading the node knows which picture comes  out where. Now publish it. With the node selected,  

  • 00:04:05 click Publish Subgraph, keep its name and confirm.  It is saved as a blueprint in your user folder,  

  • 00:04:12 separate from this workflow. Open the  library panel. Under My Blueprints,  

  • 00:04:17 upscale and resize is ready; drag a fresh instance  onto the canvas. Each instance is independent:  

  • 00:04:23 changing 1 copy never changes the others. Second  skill: run only what you need. Select the 2 savers  

  • 00:04:32 of the watercolor branch from Lecture 3, then  click the play button in the selection toolbox:  

  • 00:04:38 execute to selected output nodes. Only that  branch runs; the watchmaker, the upscalers and the  

  • 00:04:45 detailer stay idle. Open the result: the Aquarelle  LoRA gives this soft, washed watercolor look with  

  • 00:04:51 a paper texture. Now select the LoRA loader and  press Ctrl+B. It turns purple: bypassed. The model  

  • 00:05:00 passes straight through it, as if the LoRA were  not there at all. Then select the thumbnail saver  

  • 00:05:07 and press Ctrl+M. A muted node turns grey and  does not execute. Bypass passes data through; mute  

  • 00:05:13 stops execution at that node. Select both savers  again and run the same button. Watch the canvas:  

  • 00:05:20 the loaders and the prompt encoder do not light  up, because nothing they depend on has changed.  

  • 00:05:28 ComfyUI caches every node's result and runs again  only what depends on a change. The job queue lists  

  • 00:05:33 both runs; this one took less time, because no  loader ran again. Open the new result. Without  

  • 00:05:41 the LoRA, the same seed number gives a crisp  painted scene; with it, soft washes and paper  

  • 00:05:46 texture. 1 key press, 1 comparison, no rewiring.  Next, an interface for people who never want to  

  • 00:05:55 see the graph. Open the delivery workflow from  the course files: the watchmaker generation,  

  • 00:06:00 our upscale and resize blueprint and the Save  Image node at the end. Switch from Graph to  

  • 00:06:06 App with the switch at the top left, then click  Build app. The nodes change to a form layout,  

  • 00:06:12 and a 3-step guide appears at the top. Step 1,  inputs: click the parameters a user may set.  

  • 00:06:18 The prompt text, the seed number and the file name  prefix; each one appears in the list on the right.  

  • 00:06:25 Step 2, outputs: click Next, then click the  Save Image node. Its saved picture is what  

  • 00:06:30 the app shows as the result. Step 3, preview:  click Next. This is the layout a user sees,  

  • 00:06:37 the inputs on the right and the results in  the middle. Click Save as, name it watchmaker  

  • 00:06:42 app and choose App, so this file opens as a  form by default. Save it, then view the app.  

  • 00:06:52 The form opens with the workflow's own prompt  still in the text field, so first select all of  

  • 00:06:57 it. Type a new prompt into the form: a lighthouse  keeper polishing a brass lamp. Then press Run.  

  • 00:07:04 Behind the form, the same graph runs, with our  blueprint inside it. The result appears in the  

  • 00:07:12 middle. The user saw 3 fields and 1 button: the  graph is the implementation, and the form is its  

  • 00:07:18 interface. Shrink the window, like a phone or  a small laptop screen. The layout switches to  

  • 00:07:24 separate pages, so the form and the results take  turns rather than sitting side by side. To share  

  • 00:07:30 it, open the workflow actions menu and choose  Export, then save the file in our course folder.  

  • 00:07:36 Comfy Cloud can create share links; on a local  install, the JSON file is what you share. Bring  

  • 00:07:45 the exported file back in: it opens straight into  the form. The receiver also needs the same models  

  • 00:07:51 and custom packs; the file describes the workflow,  it does not contain them. Curious what that file  

  • 00:07:57 stores? Open the exported app in the editor. Near  its end, linear data lists the inputs we chose:  

  • 00:08:03 node 5's text, node 8's seed number and node 10's  file name prefix. Its outputs hold a single entry,  

  • 00:08:12 node 10, the Save Image node. Everything else is  the ordinary graph, so an app file is simply a  

  • 00:08:18 workflow plus a short list of what the form  shows. Now the bridge to automation. Switch  

  • 00:08:23 back to the graph and open the File menu. Older  guides say Export (API) stays hidden until you  

  • 00:08:29 enable Dev Mode; in this version it is already  here. That is our first lesson in stale advice:  

  • 00:08:36 check the interface in front of you. Choose  Export (API), type watchmaker_API as the file  

  • 00:08:41 name and save it into the API folder of our course  files, next to the client scripts. Open it in the  

  • 00:08:50 editor. The normal export stores positions, sizes  and colours for the canvas. The API export keeps  

  • 00:08:56 only what the server needs to run the job. Every  node is a numbered entry with its class type and  

  • 00:09:02 its inputs. The sampler's positive input is a  short list: node 5, output 0. That is a wire,  

  • 00:09:08 written as the source node and its output index.  Follow it to node 5, the prompt encoder. Its text  

  • 00:09:15 is a literal value, just a string that a script  can replace, and that is exactly what our client  

  • 00:09:21 will do. The blueprint's inner parts get IDs like  11:12: the subgraph first, then the part inside.  

  • 00:09:28 This is the same numbering idea we saw for nested  errors. The course files include a small client  

  • 00:09:36 that uses only Python's standard library. Open  a command prompt in the API folder and activate  

  • 00:09:41 the ComfyUI environment we already have. First,  inspect the export offline. The inspector lists  

  • 00:09:51 each node, its class type, every link and the  prompt text, so you can find the node to change:  

  • 00:09:56 here, node 5. Before changing anything, read  what the inspector just read. Python loads  

  • 00:10:04 this JSON file as a dictionary: curly braces  become a dictionary, square brackets a list,  

  • 00:10:10 and each node ID stays in quotes, so it is text,  not a number. The inspector's load function checks  

  • 00:10:17 that every node has a class type and inputs. The  normal editor export has neither, so it is refused  

  • 00:10:23 with a clear message instead of failing later.  Now the client itself. It starts with its options:  

  • 00:10:30 the workflow file, the prompt node, the new  text, the server address and a dry run switch.  

  • 00:10:35 You choose all of them on the command line. Then  2 checks protect you. If the node ID is not in  

  • 00:10:41 this export, the client stops; if the chosen  input is a link or a number rather than text,  

  • 00:10:46 it stops as well. That matters, because IDs belong  to 1 export. The readme's example uses number 6,  

  • 00:10:53 but in our export, 6 is the zero-out step, so  a copied ID is refused before anything goes to  

  • 00:11:00 the server. Then 1 line does the real work:  it replaces the text of the chosen input.  

  • 00:11:06 The request is the whole graph plus a client ID,  and with dry run the client prints it and stops,  

  • 00:11:12 before any network call. For a real run, the  client stores the request, posts it to the prompt  

  • 00:11:18 route, then asks the history route about this ID  until the job completes or fails. Last, it fetches  

  • 00:11:25 every output file through the view route, one by  one. 2 warnings. The local server has no password,  

  • 00:11:34 so keep it on your own computer; starting it with  the listen option opens it to your network. And  

  • 00:11:40 these routes can change between releases, so pin  the ComfyUI version your scripts rely on. Now a  

  • 00:11:47 dry run. The client replaces node 5's text with a  new prompt and prints the request it would send,  

  • 00:11:53 without contacting the server. Read it before  you send it. Execute the same command, this  

  • 00:12:01 time for real. The client posts the workflow,  gets back a prompt ID, then polls the history  

  • 00:12:06 until the job is done and saves the image to disk.  Submission is not completion. The ID is a receipt;  

  • 00:12:14 only the history entry tells you whether the job  succeeded, failed or is still running. The client  

  • 00:12:21 also saved its own record, in a folder named after  the run: the exact request, the server's answer,  

  • 00:12:27 the history and the downloaded image. That record  lets you reproduce or audit the job. Here is that  

  • 00:12:35 folder: the request we sent, the server's answer,  the finished history entry and the saved image,  

  • 00:12:42 side by side. Select the image: the lighthouse  keeper from our new prompt, made without touching  

  • 00:12:48 the browser. Now open the history in the  browser. The newest entry holds the outputs,  

  • 00:12:55 the status and a list called execution cached:  the nodes the server did not rerun because their  

  • 00:13:01 results were unchanged. Next, the live schema:  /object_info. Open it for a single sampler,  

  • 00:13:07 the KSampler. Every input, its type, default  and range comes from the running server itself,  

  • 00:13:12 custom nodes included. The official Comfy Python  SDK packs the same steps into a clean client for  

  • 00:13:19 Comfy API v2: load the workflow, set an input,  run, then fetch the outputs. Our raw client shows  

  • 00:13:25 each of those steps by hand. If you choose the  SDK, pin it like any other dependency. Ask pip  

  • 00:13:33 which versions exist: 0.5.0 is the newest today,  so install exactly that one. With a local ComfyUI,  

  • 00:13:40 it connects through Comfy's small API proxy. Now  3 prompts. The queue script in the course files  

  • 00:13:46 reuses the same client: 1 workflow, 3 prompts  from a text file, and a unique file name prefix  

  • 00:13:52 for each job. Run the script. The client submits  every prompt, then cancels the last one while it  

  • 00:13:59 is still queued, to show the difference  between a cancelled job and a failed one.  

  • 00:14:06 The summary lists every job ID with its outcome:  2 completed with their files, 1 cancelled before  

  • 00:14:12 it started. A rejected request never gets an ID;  a failed job has an error in its history. And if  

  • 00:14:20 the client times out, the outcome is unknown, not  failed. Check the job ID in the history first,  

  • 00:14:25 because resubmitting blindly can run the same job  twice. Here is the run folder from the summary.  

  • 00:14:32 Each submitted job left its request, the 2  completed ones left their history and their  

  • 00:14:38 images, and the cancelled job left only its  request. Here are the lighthouse keeper and  

  • 00:14:44 the bookbinder. Now read how the script works.  It imports the request helper from our client,  

  • 00:14:53 so the code that talks to the server exists only  once. For each prompt it makes a fresh copy of  

  • 00:15:02 the graph, writes in the prompt and a numbered  file name prefix, and submits it. A request  

  • 00:15:07 the server refuses gets no ID, so it is marked  rejected right away. Cancelling is a request too:  

  • 00:15:16 the script asks the queue for its waiting  jobs and deletes the last one only while  

  • 00:15:21 it is still waiting. Then it polls each  remaining ID. Completed fetches the files,  

  • 00:15:29 an error in the history means failed, and running  out of time means unknown, never a failure. Pause  

  • 00:15:35 here and predict. A coding assistant recommends  installing a node pack whose feature has been in  

  • 00:15:42 ComfyUI's core for a year. What would have caught  that mistake? The live schema. /object_info lists  

  • 00:15:48 every node this server really has. Ask it for  InpaintCropImproved: the crop and stitch pack  

  • 00:15:54 from Lecture 5 answers with its exact inputs. Now  open that pack's init.py file in the editor.  

  • 00:16:01 2 dictionaries register everything: the class  mappings tie each internal name to Python code,  

  • 00:16:06 and the display name mappings give the scissors  titles you see in search. In the main file, the  

  • 00:16:13 stitch node fits on 1 screen. INPUT_TYPES declares  2 inputs, the stitcher and the inpainted image;  

  • 00:16:19 RETURN_TYPES says that it outputs 1 image.  FUNCTION names the call ComfyUI makes when it  

  • 00:16:26 runs, and CATEGORY places it in the library. That  is the whole contract of a classic custom class.  

  • 00:16:33 Finally, the pyproject.toml file. Its version,  3.0.17, is exactly what a workflow records as ver,  

  • 00:16:40 and the publisher entry makes the pack a  Registry package. Reading the code is 1 check;  

  • 00:16:46 the pack's health is another. Its folder has a  tests folder and no requirements file: this pack  

  • 00:16:52 adds no Python packages, so installing it cannot  change what your other nodes rely on. Open 1 test.  

  • 00:16:58 It makes a random image and a mask, crops a  40-pixel square to 64 pixels and checks the  

  • 00:17:04 exact size of the result. Tests like this catch  a broken update before your workflow does. Then  

  • 00:17:10 check its releases on the registry page. Version  3.0.20 came out on October 21, and we run 3.0.17.  

  • 00:17:19 Regular releases are a good sign; read the  changes, then try them on a test copy. A  

  • 00:17:25 custom node is Python running with your user's  rights, with network access and with any keys  

  • 00:17:31 in your environment. So before you install one,  look at what it does. Let's check the Impact Pack,  

  • 00:17:36 from a command prompt opened right in its folder.  Search all of its Python files for subprocess,  

  • 00:17:43 download, eval and exec. This is triage, not  a security review, but it shows where the code  

  • 00:17:49 reaches outside ComfyUI. 2 places matter. The  install script downloads a Segment Anything model  

  • 00:17:56 from Meta's server, a pickle-format file, and a  helper runs pip install for onnxruntime when it is  

  • 00:18:02 missing. Compare that with the Registry's rules:  no eval or exec, no pip installs at runtime,  

  • 00:18:08 no obfuscated source files. A popular pack can  predate a rule; your job is to know, not to panic.  

  • 00:18:20 Now a second search, for environment variables,  tokens and network calls. The install script reads  

  • 00:18:26 2 folder variables, and then copies the whole  environment into the process it starts. The 2  

  • 00:18:32 requests lines are tests that only talk to this  computer. That copy matters. Any token in your  

  • 00:18:38 environment, a Hugging Face token or a paid  API key, reaches every process a pack starts,  

  • 00:18:43 so launch ComfyUI from a console without  unrelated keys. But 1 network call slips past  

  • 00:18:49 the search. The classifier node hands a Hugging  Face repository name to the transformers library,  

  • 00:18:55 which fetches that model the first time the node  runs. That is why a text search is only triage.  

  • 00:19:01 Next, its requirements file: 10 packages and  not a single version number. One of them, SAM 2,  

  • 00:19:07 comes straight from a git address. Unpinned means  the next install may pull different versions,  

  • 00:19:12 and the Manager treats a git address as a  high risk source. Last, record the hash of the  

  • 00:19:24 model the install script downloaded. certutil  prints it in a second. The file is a pickle,  

  • 00:19:29 which can run code when it loads, so this  hash proves you have the same file next time.  

  • 00:19:39 Keep a record that can rebuild this state. In  the ComfyUI prompt, write the current commit  

  • 00:19:44 and the exact Python package versions into  2 text files. The first line from the notes  

  • 00:19:50 asks git for the exact commit of this folder  and saves it in a text file. The second line,  

  • 00:19:57 pip freeze, lists every installed package  with its exact version: our lock file.  

  • 00:20:04 Open them. The commit names the precise core  code, and the lock file pins every package,  

  • 00:20:09 torch included. Together with the node pack  versions, this is your last working state. The  

  • 00:20:15 Manager can write all of this into 1 single file,  and that file is called a snapshot. Open a prompt  

  • 00:20:22 in the ComfyUI folder straight from the address  bar, so everything we type stays short and simple,  

  • 00:20:28 just like before. Then activate the environment  by typing the location of its activate script.  

  • 00:20:34 This environment also holds the Manager's  command line tool, so there is nothing  

  • 00:20:39 else to install. The tool needs to know where  ComfyUI is, so set that to the current folder,  

  • 00:20:49 then save a snapshot right next to our records.  Open it. The first line is the ComfyUI commit,  

  • 00:20:58 the same one our text file holds. Below it, every  registry pack with its exact version: Impact Pack  

  • 00:21:04 8.28.3, Crop and Stitch 3.0.17. Then every Python  package with its version, like our lock file. So  

  • 00:21:15 the lock file pins Python packages only, while the  snapshot adds the core commit and the node packs.  

  • 00:21:20 Neither holds your models or workflows;  keep those, with their hashes, yourself.  

  • 00:21:31 Restoring is 1 command too. Its help lists the  options: restore snapshot puts every pack back  

  • 00:21:37 to its recorded version, and these pip options  restore the Python packages as well. Last,  

  • 00:21:43 the Manager's own setting. Open config.ini in the  manager folder of the user directory, change the  

  • 00:21:48 security level from normal to strong and save the  file. Strong blocks high and middle risk actions,  

  • 00:21:55 from git address installs to ordinary installs  and updates, until you lower it again. The change  

  • 00:22:01 applies when ComfyUI restarts. If something  breaks, first read what the server printed,  

  • 00:22:07 before you change anything. It keeps a copy in the  user folder, and near the end of the start-up it  

  • 00:22:13 shows every custom pack with its loading time in  seconds. When an extension fails, its line says  

  • 00:22:19 import failed, and the error just above it names  the missing module or the clashing package. that  

  • 00:22:26 one line tells you which extension to suspect, so  you do not have to guess. Most errors name their  

  • 00:22:32 class in the message. Missing node types means a  missing pack; value not in list, a missing model;  

  • 00:22:38 a shape mismatch, the wrong model family; then  out of memory, and failed imports. Name the class  

  • 00:22:44 first, then look for the fix. Inside ComfyUI the  same log is 1 click away: the Console button opens  

  • 00:22:50 it in the bottom panel. Read the full log there,  not only the short pop-up in the corner. When an  

  • 00:22:58 update breaks something, never experiment  on your working install. This second copy,  

  • 00:23:02 ComfyUI_Isolated_Test, has its own folder and  its own environment, built from that record. Its  

  • 00:23:11 launch file adds the --disable-all-custom-nodes  flag and uses another port. Double-click it,  

  • 00:23:17 and the console confirms that every custom  node pack was skipped, every single one. If  

  • 00:23:23 the problem disappears now, a custom node causes  it. Bring packs back half at a time with the  

  • 00:23:29 --whitelist-custom-nodes flag, and a few restarts  find the culprit. The client and the API workflow  

  • 00:23:37 stay in our course folder, not in this copy, so  go back up and open the API folder there. Now send  

  • 00:23:44 our API workflow to this copy. Open a prompt in  the API folder, activate the environment and run  

  • 00:23:50 the client with the server address on port 8190.  Core nodes only, and the job completes: the same  

  • 00:23:58 graph and the same models, running in a separate  environment that was rebuilt from the record.  

  • 00:24:03 The record folder holds the picture this restored  copy made: the same lighthouse keeper our working  

  • 00:24:10 install made, from the same graph and models, in  an environment we rebuilt from our records. Now  

  • 00:24:17 narrow it down for real. This second launch file  has the same options, plus whitelist custom nodes  

  • 00:24:23 followed by 1 folder name, the Crop and Stitch  folder. Close the running copy and start this one.  

  • 00:24:32 The import list now shows a single pack. If the  problem comes back, that pack is your suspect; if  

  • 00:24:38 not, allow the next half. The same idea explains  Lecture 6's Colab notebook. There, the environment  

  • 00:24:46 root is /content/ComfyUI, and every model goes  into its models folders. On this computer the root  

  • 00:24:54 is our ComfyUI folder, and extra_model_paths.yaml  adds shared folders. The workflow names its files;  

  • 00:25:01 each environment decides where they live. Let's  recap. A subgraph packages a reusable part behind  

  • 00:25:08 a few named controls, partial execution and  the cache keep iteration fast, and an app form  

  • 00:25:13 hides the graph from its users. The API export  plus a small client runs jobs without clicking,  

  • 00:25:20 and the job ID with its history tells you the  real outcome. The live schema and the pack's own  

  • 00:25:25 source beat old advice. Keep a dependency record,  test in an isolated copy and raise the Manager's  

  • 00:25:32 security level. Next lecture trains our own LoRA,  where a dataset becomes a scripting problem.

Clone this wiki locally