Repository navigation
Generative AI Full Course Lecture 2 Build a ComfyUI Workflow from Scratch with Z Image Turbo
Full tutorial link > https://www.youtube.com/watch?v=T2_z7ZaffyI
Build a ComfyUI image workflow from individual nodes and follow the data from a written prompt to saved pixels. In Lecture 2 of this 14-lecture Generative AI course, we use Z-Image-Turbo on Windows to connect the model loaders, conditioning, latent, sampler and decoder, then test the controls on real outputs.
🔗 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 ]
Official ComfyUI manual installation: [ https://docs.comfy.org/installation/manual_install ]
Z-Image Turbo workflow and model downloads: [ https://docs.comfy.org/tutorials/image/z-image/z-image-turbo ]
SECourses Discord: [ https://discord.com/invite/software-engineering-courses-secourses-772774097734074388 ]
🎯 You will learn how to update an existing ComfyUI installation, inspect a grouped template, refresh model files, build and connect the graph, read socket types, measure warm generation time, test repeatability, compare resolution, sampling steps and guidance, and recover a workflow from its original PNG.
🧩 Main topics include CLIP conditioning, latent images, ModelSamplingAuraFlow, KSampler, VAE Decode, fixed and random seeds, execution caching, CFG, controlled comparisons, PNG metadata and workflow JSON.
Use the chapters to follow the build or jump to a particular setting and comparison.
⏱️ Chapters:
00:00:00 From the first image to its workflow
00:01:06 Update ComfyUI and its matching Python dependencies
00:03:53 Open the packaged workflow and trace its stages
00:05:21 Refresh model files without restarting the server
00:06:35 Load the three models and connect their roles
00:08:41 Turn the prompt into conditioning for the model
00:10:00 Connect the latent and choose the sampling settings
00:12:50 Decode the sampled latent and save the image
00:14:21 Run the complete graph and inspect the result
00:15:40 Change the prompt and watch cached stages
00:16:44 Compare resolution and the actual computation cost
00:20:07 Test fixed seeds and explore with random seeds
00:23:00 Compare sampling steps on the Turbo model
00:25:21 Inspect guidance changes on this distilled model
00:27:33 Test the negative branch at guidance one
00:29:19 Change one variable and explain the difference
00:30:41 Recover the workflow from PNG and export JSON
00:33:02 Follow the restored graph to the saved image
This video is for anyone who has a working ComfyUI installation and wants to understand the graph behind an image. Follow Lecture 1 first if you need the Windows setup.
💬 For help, check the pinned comment, join our Discord, or leave a comment. Support SECourses on Patreon for more guides, scripts and resources.
#ComfyUI #GenerativeAI #ZImageTurbo
-
00:00:00 Greetings everyone. Today I am going to show you how to build an image workflow in ComfyUI.
-
00:00:06 We will start with this result and follow the connections that create it. In our 1st lecture,
-
00:00:12 we used this Z-Image-Turbo workflow. You can see the prompt on the left and the generated image on
-
00:00:20 the right. This picture started as a written description. The large node contains several
-
00:00:26 operations. It loads the models, processes our words, and generates the image. We will open it,
-
00:00:34 then build those operations ourselves on an empty canvas. You will also see what the seed, steps,
-
00:00:41 and guidance change. We will compare actual images while keeping the other settings fixed. That makes
-
00:00:49 each difference much easier to understand. You can find the chapters and workflow files in the
-
00:00:55 tutorial description. 1st, let us update the installation from the previous lecture. Then
-
00:01:01 we will use that environment for our comparisons. Let us update ComfyUI before building our graph.
-
00:01:09 This is the official update page. We installed the manual version in the 1st lecture, so
-
00:01:14 choose the Manual Installation tab here. A manual update has 2 parts. Git updates the source code,
-
00:01:22 and the requirements command installs its matching Python dependencies. Both belong to the existing
-
00:01:29 installation, using its own Python environment. Open File Explorer and go to the ComfyUI folder
-
00:01:37 you created in the 1st lecture. I am entering the complete path in the address bar, then pressing
-
00:01:44 Enter to open it. This folder contains the application and its virtual environment. We will
-
00:01:50 update this copy. Your model files remain in their existing model folders, and the shared model path
-
00:01:57 configuration stays in place. Click the address bar, type CMD, and press Enter. That opens a
-
00:02:05 Command Prompt inside this folder. Check the path at the prompt before entering the update commands.
-
00:02:12 1st, activate this installation's virtual environment. Type this command and press Enter.
-
00:02:19 The prompt now starts with (venv). That prefix identifies the active virtual environment in
-
00:02:26 this window. Let us check which Python is active. Type this command and press Enter. The 1st result
-
00:02:34 should point inside the virtual environment of this ComfyUI installation. That is the interpreter
-
00:02:40 we want. Now update the source code. Type this Git command and press Enter. The fast forward option
-
00:02:48 accepts the update only when Git can advance directly from the current commit to the new
-
00:02:54 1. The source update has finished. Next, install the requirements with this command. Using Python
-
00:03:02 followed by the module option runs pip through our active interpreter, keeping the dependencies
-
00:03:08 in this virtual environment. The requirements file describes the packages this source version needs.
-
00:03:15 These include the browser interface and packaged workflows. Updating the code and its requirements
-
00:03:22 together keeps those parts of the installation aligned. The installer has returned to the prompt.
-
00:03:28 The code and dependencies are now updated. Restart ComfyUI next so the running server
-
00:03:34 loads that updated installation, then refresh its page in the browser. ComfyUI has restarted with
-
00:03:42 the updated code. Refresh its browser page to load the matching interface. We are back at the
-
00:03:48 same workflow, ready to look inside the grouped image generator. Click the small arrow in the
-
00:03:55 upper corner of the grouped generator to open it. This single box contains a connected graph.
-
00:04:01 Each node performs an operation, and each wire carries a particular data type. Start with these
-
00:04:09 3 loaders. 1 loads the image generation model, 1 loads the text encoder, and 1 loads the VAE. This
-
00:04:17 workflow keeps those model components in separate files. Follow the text encoder connection into the
-
00:04:24 prompt node. It turns our words into conditioning for the image model. That conditioning reaches
-
00:04:31 the sampler, while the zeroed branch supplies the other conditioning input. The empty latent
-
00:04:37 defines the image dimensions before any pixels exist. The sampler uses that latent, the model,
-
00:04:43 and the conditioning. Its seed chooses the starting noise, and its steps control the
-
00:04:49 sampling iterations. The sampler produces a latent, rather than a finished picture.
-
00:04:55 Follow its output into the decoder. The decoder uses the matching VAE to turn that representation
-
00:05:03 into pixels we can display and save. Press Escape to return to the outer workflow. The group sends
-
00:05:10 its image through this blue connection to Save Image. We will build the same stages ourselves,
-
00:05:17 so every connection has a clear purpose. Model files can live in the shared folders we configured
-
00:05:25 in the 1st lecture. Open the VAE folder in File Explorer. This contains the decoder file that our
-
00:05:33 workflow already uses. Let us add a copy in a new subfolder. Select the decoder file and copy it.
-
00:05:42 Create a folder named LectureTwo. Subfolders help organize model files while keeping them available
-
00:05:50 to the loader. Open the new folder and paste the file here. This is a copy of the same decoder,
-
00:05:57 so its weights have not changed. We are testing how the interface discovers a newly added model
-
00:06:04 path. Back in ComfyUI, press R to refresh the available model lists. Then open the VAE selector
-
00:06:11 in the grouped workflow. The new entry includes its subfolder name, making the copied file easy to
-
00:06:18 identify. Select the new entry. ComfyUI can now use this file without restarting the server. The
-
00:06:26 original entry remains available too. When you add a different model, place it in the matching folder
-
00:06:32 and refresh this list. Click the plus beside the workflow tabs to start an empty graph.
-
00:06:39 Double click on the left side of the canvas. This opens the node search panel, where we can find
-
00:06:45 individual operations. Type Load Diffusion Model and press Enter. Then click on the canvas to place
-
00:06:53 the node. This loader will provide the image model used by our sampler. We will connect its output
-
00:07:00 after adding the next stage. The model field shows our Z-Image-Turbo file. Leave the weight data type
-
00:07:08 at default. The purple output carries the loaded model, which we will connect to the next operation
-
00:07:16 in the sampling path. Double click beside the loader and add ModelSamplingAuraFlow. This
-
00:07:23 operation configures how the model interprets the sampling process. We are using the same
-
00:07:30 model-specific setup as the working template we just opened. Drag the purple model output into the
-
00:07:37 purple model input. Both sockets carry the same type. Set shift to 3 and leave sampling at flow,
-
00:07:45 matching this Turbo workflow. Its output now supplies the configured model. Add Load
-
00:07:52 CLIP below the diffusion loader. Despite this familiar node name, it can load several text
-
00:07:58 encoder families. We will use the Qwen encoder required by this Z-Image-Turbo workflow. The
-
00:08:07 encoder file is selected here. Set the loader type to lumina2, as the template requires. That setting
-
00:08:15 tells the loader how to handle this encoder. The yellow output will connect to our prompt
-
00:08:21 node. Add Load VAE beneath the text encoder. This 3rd loader provides the decoder that converts the
-
00:08:30 generated latent into pixels. Its red output will join the sampler output at the VAE Decode
-
00:08:39 node. Add CLIP Text Encode to the right of the text encoder. This node holds our prompt.
-
00:08:47 It uses the loaded encoder to turn those words into conditioning for the image model. Connect the
-
00:08:55 yellow CLIP output to the matching input on the prompt node. The loader supplies the encoder. The
-
00:09:03 prompt node applies it to our text and produces conditioning at the orange output. Enter the
-
00:09:11 workstation description from the lesson files. It names the subject, the university laboratory,
-
00:09:16 and the lighting. These concrete details give us a clear starting point when we
-
00:09:23 compare prompt changes later. Add Conditioning Zero Out below the prompt. The working template
-
00:09:31 uses this operation for the negative branch. We will keep that arrangement for our 1st image,
-
00:09:38 then test what guidance changes later. Connect the prompt conditioning output to this input. Zero
-
00:09:46 Out creates a matching conditioning structure with its values zeroed. The original prompt output will
-
00:09:53 feed the positive branch, while this output will feed the negative branch. Add EmptySD3LatentImage
-
00:10:02 below the conditioning nodes. This supplies the latent shape required by our image model. Its name
-
00:10:08 reflects its origin, but the 16-channel layout also fits this workflow. Set the width and height
-
00:10:16 to 1024, with a batch size of 1. We are requesting 1 square image. These dimensions determine the
-
00:10:25 latent size before the sampler begins its work. Add KSampler to the right of these stages. It
-
00:10:33 brings together the configured model, positive and negative conditioning, and the starting latent.
-
00:10:39 Its controls determine how the sampling process produces a new latent. Connect the configured
-
00:10:47 model output to the sampler model input. Follow the purple route from the diffusion loader,
-
00:10:53 through AuraFlow, into KSampler. This is the model that will perform the image generation. Connect
-
00:11:01 the prompt output to positive. Then connect Zero Out to negative. Both orange wires carry
-
00:11:07 conditioning, but the input labels tell us their roles. Trace each wire back to its source before
-
00:11:14 running the graph. Connect the latent output to the sampler latent image input. We now have
-
00:11:21 all 4 inputs connected. The sampler will use this shape and its seed to begin the sampling process
-
00:11:28 at our chosen resolution. Enter the seed from the reference workflow. This number determines the
-
00:11:36 initial random noise used for sampling. Keeping it fixed helps us compare changes to another setting
-
00:11:43 without changing the starting noise at the same time. Set control after generate to fixed. This
-
00:11:51 keeps the displayed seed unchanged after a run. Later, we will use randomize to explore variations
-
00:11:58 and compare that behavior with deliberate experiments using a fixed seed. Set steps to 8
-
00:12:06 and guidance to 1, matching our Turbo template. This model is designed for a short sampling
-
00:12:12 run. We will compare these controls separately after confirming that the complete graph works.
-
00:12:21 Choose res_multistep as the sampler, then simple as the scheduler. These are the 2 selections used
-
00:12:28 by our working template. Keeping the same recipe gives us a reliable baseline for the
-
00:12:34 comparisons that follow. Keep denoise at 1 for this text-to-image workflow. We begin from an
-
00:12:41 empty latent shape, so we use the full sampling schedule. The pink output carries the sampled
-
00:12:46 latent that we will decode next. Add VAE Decode to the right of the sampler. Sampling produces a
-
00:12:55 latent representation. This node uses our loaded decoder to turn that representation into the
-
00:13:02 visible pixels of an image. Connect the sampler latent output to samples on the decode node.
-
00:13:12 Follow this pink wire from the operation that generates the latent to the operation that
-
00:13:18 converts it into an image we can inspect. Connect the red output from Load VAE to the decoder input.
-
00:13:26 The decode node now has both the sampled latent and the model needed to convert it. Its blue
-
00:13:32 output will carry the image. Add Save Image below the decoder. This final operation writes the image
-
00:13:41 to the ComfyUI output folder and displays a preview. It also makes the end of our graph
-
00:13:47 explicit: we want a saved image. Connect the blue image output to Save Image. The graph now has a
-
00:13:55 complete route from its model loaders and prompt through sampling and decoding. Every required
-
00:14:01 input should have the matching connection we just created. Set the filename prefix to this lesson
-
00:14:08 folder and Reference. ComfyUI adds a numbered suffix when it saves each image. This keeps the
-
00:14:15 results together while giving each generated file its own name. Click Run to execute the complete
-
00:14:23 graph. ComfyUI follows the connections needed to produce our saved image. Watch the active stages
-
00:14:30 as the prompt is encoded, the latent is sampled, and the result is decoded. The image now appears
-
00:14:37 in Save Image. A completed run confirms that these connected stages work together. We still need to
-
00:14:44 inspect the picture itself, because successful execution does not guarantee that every prompt
-
00:14:50 detail was followed. Right click the image preview to access its image commands. We will
-
00:14:56 open the result at a larger size, then compare what the prompt requested with the objects and
-
00:15:03 lighting that actually appeared. Choose Open Image to inspect the saved result. The central monitor,
-
00:15:12 colorful shapes, speakers, and laboratory setting are recognizable. This gives us a useful baseline,
-
00:15:19 but the foreground hardware needs a closer look. Look at the keyboard in the foreground. It has
-
00:15:26 merged with the body of a graphics card instead of showing 2 separate objects. This is why we
-
00:15:33 inspect relationships and shapes, rather than judging only overall sharpness. Return to the
-
00:15:41 graph and replace only the lighting sentence. We will ask for cool overhead fluorescent lighting.
-
00:15:47 Keep the seed, dimensions, and sampling recipe unchanged so that the prompt is the variable we
-
00:15:54 are testing. Run the edited prompt. The unchanged model loaders can reuse their previous results.
-
00:16:01 The changed text must be encoded again, and its new conditioning causes sampling and decoding
-
00:16:08 to execute for the new image. The new image has a cooler room and visible overhead lights. The desk
-
00:16:15 and object arrangement also changed. A prompt edit can affect the whole composition, even when the
-
00:16:21 seed and every sampling setting stay fixed. Open this result and compare its foreground with the
-
00:16:30 1st image. The graphics card is now separate from the keyboard. Our lighting edit changed more than
-
00:16:36 color, so describe the observed result without assuming a perfectly isolated visual effect.
-
00:16:44 Return to the graph and restore the original prompt. We are starting a different comparison
-
00:16:49 now. Keep the fixed seed and 8-step recipe, then reduce both latent dimensions to 512.
-
00:16:58 Set width and height to 512, leaving batch size at 1. This requests a smaller square
-
00:17:04 image. Its smaller latent gives the model less spatial work at each sampling step.
-
00:17:11 Run this smaller version and watch the sampler finish. We will compare it with the larger result
-
00:17:17 using the same model and recipe. Actual timing depends on the hardware and whether the models
-
00:17:24 are already loaded. Open the smaller output for inspection. It contains the same broad subject,
-
00:17:31 but the hardware arrangement differs and fine detail is limited. Changing resolution changes
-
00:17:37 the noise layout too, even with the same displayed seed. Choose Open Image and inspect the monitor
-
00:17:45 and foreground hardware. At this resolution, small edges have fewer pixels to describe them.
-
00:17:51 The result is also a different composition, rather than a simple reduced copy of our baseline. Return
-
00:17:59 to the graph and set both dimensions back to 1024. Doubling each side gives 4 times as many
-
00:18:06 output pixels. The work inside the model need not increase by exactly that same factor. Run the
-
00:18:13 larger version again. Both comparison runs now use models that have already been loaded. This
-
00:18:19 avoids confusing initial loading time with the cost of generating a larger latent and decoding
-
00:18:26 more pixels. The larger result returns to our reference composition. Use the recorded timings
-
00:18:32 with their resolution and hardware details when comparing performance. Model loading, sampling,
-
00:18:38 and decoding are different costs, so keep those measurements separate. Open the Console panel to
-
00:18:46 inspect the generation log. Sampling progress and completed-prompt timing describe different parts
-
00:18:52 of the work. Read each measurement with its units before using it to compare the 2 resolutions.
-
00:19:01 These 2 warm runs completed in about 0.97 seconds and 3.23 seconds. The larger image took longer on
-
00:19:10 this machine, but neither number represents sampling alone. The larger run reports about
-
00:19:16 2.8 iterations per second. Inverting that rate gives roughly 0.36 seconds per step.
-
00:19:23 This sampling measure excludes the separate image decoding stage. The memory messages describe model
-
00:19:31 loading and allocation, not a complete peak-memory measurement. Our companion measurements include
-
00:19:38 sampled device usage. They include resident models and other allocations, so they cannot isolate the
-
00:19:45 cost of the larger latent. Return to the graph. Increasing both dimensions produces more latent
-
00:19:53 patches for the model to process. Attention connects information across those patches,
-
00:19:58 so total computation and memory need not scale in a simple pixel-count ratio. Now let us test a
-
00:20:08 fixed seed with a fresh calculation. An unchanged graph can reuse its previous image, which would
-
00:20:15 not test repeatability. Open the ComfyUI menu so we can clear its execution cache. Open the
-
00:20:24 Edit menu and find the option to unload models and the execution cache. This removes stored execution
-
00:20:31 results. It leaves the nodes, connections, prompt, and chosen settings in our workflow
-
00:20:36 intact. Choose Unload Models and Execution Cache. The next run will calculate the result again and
-
00:20:44 reload the required models. We are keeping the graph settings unchanged, including the seed and
-
00:20:49 the original prompt. Run the unchanged workflow again. Watch the active sampling stage so we know
-
00:20:57 this is a new calculation. Repeating the same seed is meaningful only when the other inputs
-
00:21:03 and execution conditions also stay the same. The regenerated image matches our reference,
-
00:21:09 including the fused keyboard and graphics card. The saved pixel comparison confirms the match
-
00:21:14 in this environment. Different hardware, software versions, or computation settings can still change
-
00:21:22 results elsewhere. Enter a different starting seed and set control after generate to randomize. After
-
00:21:30 each run, this control chooses another seed for the next request. That makes it useful for
-
00:21:36 exploration instead of a controlled comparison. Run this variation with the new starting seed.
-
00:21:43 The prompt and sampling recipe remain unchanged. We are exploring another starting noise pattern,
-
00:21:49 which can change the placement and appearance of objects throughout the image. This variation
-
00:21:55 separates the graphics card and places a closed laptop in the foreground. Notice that
-
00:22:01 the displayed seed has changed after generation. The saved image records the seed actually used for
-
00:22:09 that result. Run once more using the newly displayed seed. Compare the monitor, desk,
-
00:22:16 and foreground objects with the previous result. Keep the output files when exploring, because each
-
00:22:23 image belongs to the seed used for its own generation. Return the seed control to fixed
-
00:22:29 for our next comparison. These variations help us search for a useful composition, but they do not
-
00:22:36 isolate another setting. Fixed control keeps the chosen seed from changing after each run. Restore
-
00:22:44 our original reference seed before changing the sampling steps. We want each step count to begin
-
00:22:50 from the same noise pattern. Keeping the prompt, dimensions, and guidance unchanged will make the
-
00:22:57 comparison easier to interpret. Set steps to 2 while keeping the reference seed, prompt, and
-
00:23:04 guidance fixed. We will compare 2, 4, and 8 steps. This tests sampling effort within the same Turbo
-
00:23:12 recipe, rather than changing several controls together. Run the 2-step version. It finishes
-
00:23:18 quickly, but inspect the monitor gradients and foreground hardware before judging it.
-
00:23:23 Fewer sampling steps reduce work, while the visual trade-off depends on the model and the particular
-
00:23:30 image. Open the result to inspect those details. The monitor colors are less cleanly formed,
-
00:23:36 and the foreground hardware looks fragmented. A fast completed job is useful only if its image
-
00:23:43 is good enough for your purpose. Choose Open Image and examine the monitor edges and the
-
00:23:49 hardware on the desk. This is our 2-step result. Keep these details in mind while we increase the
-
00:23:56 sampling effort without changing the other inputs. Return to the graph and set steps to 4. The same
-
00:24:04 seed keeps this comparison anchored to the same starting noise. Run it again, then inspect whether
-
00:24:11 the extra sampling work improves the details we just identified. The 4-step result has cleaner
-
00:24:18 monitor edges and a distinct graphics card in the foreground. Open this image for comparison.
-
00:24:25 In this particular example, the card is separated more clearly than in our 8-step baseline. Choose
-
00:24:34 Open Image and look at the 3 fans on the graphics card. The object is visibly separate here.
-
00:24:41 More steps do not guarantee that every requested relationship improves monotonically, even with
-
00:24:48 the same model and seed. Return to the graph and restore 8 steps. Run the reference recipe
-
00:24:54 again to complete the comparison. We retain all 3 outputs and their settings, so the choice can
-
00:25:00 be based on actual detail and generation cost. The reference image returns, including its foreground
-
00:25:07 object fusion. 8 steps remains the recipe used by this working template. Our small comparison
-
00:25:14 shows why a recommended starting point still needs inspection against the image you actually
-
00:25:20 want. Now change guidance from 1 to 3 and keep the other inputs fixed. Guidance changes how
-
00:25:28 conditioning influences sampling. The useful range depends on the model, and this distilled
-
00:25:36 Turbo workflow begins at 1. Run at guidance 3 and inspect the result. The colors become stronger,
-
00:25:44 while the scene loses some natural detail. Higher guidance is not an automatic quality improvement,
-
00:25:50 particularly when it moves away from this model-specific recipe. Open this
-
00:25:56 output to compare the monitor and desk with the baseline. The stronger colors are easy to notice,
-
00:26:03 but also check whether the requested objects remain present and whether their shapes still make
-
00:26:10 sense. Choose Open Image and inspect the keyboard and bright monitor. The separate graphics card is
-
00:26:18 missing from this result. A stronger response in 1 visible feature does not mean the whole prompt
-
00:26:25 was followed more accurately. Return to the graph, set guidance to 7, and run the same prompt again.
-
00:26:33 This deliberately extends the comparison beyond the template setting. Keep watching the actual
-
00:26:38 image instead of treating the guidance value as a quality score. The image is now heavily
-
00:26:44 clipped and fragmented, with intense colors and damaged shapes. Open it to see the difference
-
00:26:50 clearly. This setting has degraded our result, despite using a numerically larger guidance value.
-
00:26:58 Choose Open Image and inspect how much structure has been lost. Bright areas are clipped and the
-
00:27:04 hardware shapes have broken apart. For this model and workflow, we will return to guidance 1 before
-
00:27:11 continuing. Return to the graph and restore guidance 1. These results describe this Turbo
-
00:27:19 recipe, not a universal rule for every distilled model. Use each model documentation and working
-
00:27:26 example as the starting point for its own tests. Add another CLIP Text Encode node below the
-
00:27:36 decoder loader. This gives us a place to write real negative text. We will connect it to the
-
00:27:42 same text encoder as our positive prompt. Connect the yellow encoder output to this new prompt node.
-
00:27:50 Both text fields now use the same encoder. Their conditioning outputs will have different roles
-
00:27:56 because of the sampler inputs we connect them to. Enter blurry, low quality, distorted shapes, and
-
00:28:04 oversaturated colors as the negative text. These are terms we want to test against the result.
-
00:28:10 Leave the original positive prompt unchanged for this comparison. Connect this conditioning output
-
00:28:18 to the sampler negative input, replacing the Zero Out connection. Keep guidance at 1. We are testing
-
00:28:25 whether changing the negative branch affects the image under this exact recipe. Run the graph with
-
00:28:32 the real negative text connected. The positive prompt, seed, dimensions, and sampling recipe are
-
00:28:39 still fixed. We can therefore compare this output directly with the reference generated under those
-
00:28:45 same conditions. The result matches the reference image, and the saved pixel comparison confirms
-
00:28:51 it. In this sampler configuration, guidance 1 skips the negative prediction. Changing those
-
00:28:57 negative words therefore has no effect on these output pixels. Reconnect Zero Out to the negative
-
00:29:05 input to restore the original graph. The text test helped explain why this working recipe
-
00:29:11 uses that branch. Other models and guidance configurations can use negative conditioning
-
00:29:17 differently. Suppose you change the seed and the prompt together, and the next image looks better.
-
00:29:24 Which change caused the improvement? Pause here and decide what this comparison can actually tell
-
00:29:30 you before continuing. You know that the combined change produced a result you prefer. You cannot
-
00:29:42 identify which change caused it. Hold the seed fixed to test the prompt,
-
00:29:48 or hold the prompt fixed to compare starting noise. Our earlier comparisons used this method:
-
00:29:55 lighting changed with the seed fixed, then seeds changed with the prompt fixed. Keep each output
-
00:30:01 beside its actual settings so that a visual difference has a traceable cause. The same
-
00:30:08 care applies to the graph connections. Socket colors tell us the data type, while the model
-
00:30:14 family determines the required latent structure. Our 16-channel latent and matching decoder belong
-
00:30:20 to this working image pipeline. A matching socket type alone does not prove that 2 model components
-
00:30:27 are compatible. Use the encoder, latent layout, and decoder specified for the chosen model. This
-
00:30:34 working graph records that complete combination for later reuse. Let us recover the workflow from
-
00:30:43 its saved image. Open the lesson output folder in File Explorer. The original PNG contains the graph
-
00:30:51 and generation settings, as well as the pixels we inspected. Create a new empty workflow in ComfyUI,
-
00:30:59 leaving the completed graph available in its own tab. We will load the saved image into this empty
-
00:31:05 workspace so the recovered nodes and connections are easy to recognize. Drag the original reference
-
00:31:13 image from Explorer onto the empty ComfyUI canvas. The embedded workflow restores the nodes and
-
00:31:20 their settings. This works because we kept the original file with its workflow metadata intact.
-
00:31:28 Inspect the restored prompt, seed, and model selections. They match the reference we saved.
-
00:31:34 The image carries the workflow description, but it does not contain the model weights;
-
00:31:40 those files must still be installed. Open the ComfyUI menu and its File submenu. We
-
00:31:47 will export the restored graph as a JSON file. This preserves an editable document that can
-
00:31:55 travel independently of the image metadata. Choose Export to create the ordinary workflow file. This
-
00:32:03 format preserves the visible nodes, their layout, connections, and widget values. It is the version
-
00:32:10 another ComfyUI user can open to inspect and edit the graph. Give the file a recognizable name,
-
00:32:18 then confirm the export. The browser downloads the workflow as a separate document. Keep this
-
00:32:24 original file with the reference image so you can reopen the graph later. Open the exported file in
-
00:32:33 a text editor. The document records node types, connections, and widget values. You do not need
-
00:32:39 to edit these fields by hand to use the workflow, but they make its configuration inspectable. Keep
-
00:32:46 the workflow, original output, and matching model links together. Image services may remove embedded
-
00:32:52 metadata when they process uploads. The separate workflow file gives the next person another way to
-
00:32:58 reopen the demonstrated setup. We have built the image pipeline from individual nodes and followed
-
00:33:06 it from text to saved pixels. The prompt becomes conditioning, the sampler produces a latent,
-
00:33:13 and the decoder turns that latent into the image. You can now change 1 input, inspect its effect,
-
00:33:20 and keep a reproducible workflow with the result. The demonstrated files and chapter links are in
-
00:33:27 the description. In the next lecture, we will develop these image-generation choices further.
