Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

ComfyUI Tutorial for Beginners: Text-to-Image & Image-to-Image Workflows One graph, two workflows and Module 2 is where you build it node by node instead of loading someone else's. We start from a blank canvas and wire every connection, then change a single value and turn the same graph into...

61,166 Aufrufe • vor 1 Monat •via X (Twitter)

8 Kommentare

Profilbild von ComfyUI
ComfyUIvor 1 Monat

Run the workflow:

Profilbild von ZenithAi
ZenithAivor 1 Monat

Finally a ComfyUI tutorial that explains why the nodes connect

Profilbild von Evia AI
Evia AIvor 1 Monat

Great tutorial for making ComfyUI workflows truly understandable

Profilbild von Elise Tech Ai
Elise Tech Aivor 1 Monat

Excellent beginner-friendly breakdown—learning the logic behind each node makes ComfyUI much easier to master.

Profilbild von LRD
LRDvor 1 Monat

Top

Profilbild von Sani Ai Tech
Sani Ai Techvor 1 Monat

Great beginner-friendly breakdown that makes ComfyUI far less intimidating

Profilbild von Eva Morgan
Eva Morganvor 1 Monat

ComfyUI’s node-based workflow gives creators more control and understanding behind the generation process, not just the final output.

Profilbild von Alice The Ai Expert
Alice The Ai Expertvor 1 Monat

Perfect beginner breakdown building node by node makes ComfyUI finally click!

Ähnliche Videos

CLIP by hand ✍️ ~ 13 steps walkthrough below CLIP, Contrastive Language-Image Pre-training, is OpenAI's answer to a question that sounds impossible: how do you put a sentence and a picture in the same space? CLIP shipped when OpenAI was still open, and those embeddings were shared far and wide. Almost every multimodal model you use today descends from them. How does it work? Goal: learn one shared embedding space for text and images. = 1. Given = A mini batch of three text-image pairs. OpenAI trained the original on 400 million. = 2. Text to vectors = Let us look up each word with word2vec. = 3. Image to vectors = We cut each image into two patches and flatten them. Now text and pixels are both just numbers. = 4. The other pairs = Repeat steps 2 and 3 for the rest of the batch. = 5. Encode = Let us push both sides through their encoders, a linear layer and a ReLU. In practice these are transformers, but the shape of the operation is the same. = 6. Mean pooling = We average across the columns, so each image and each sentence collapses to a single vector. = 7. Projection = The text vectors are 3D and the image vectors are 4D, so they cannot be compared at all. A linear layer projects both to 2D. That 2D space is the shared embedding space, and getting here is the whole point of the model. = 8. Prepare for matmul = Let us copy the text vectors down and the transposed image vectors across. = 9. MatMul = We multiply, which takes the dot product of every text vector with every image vector. Each cell is one estimate of how well a sentence matches a picture. = 10. Softmax, e to the power = Raise e to each cell. To keep it hand sized we approximate e with 3. = 11. Softmax, sum = Sum each row for image to text, each column for text to image. = 12. Softmax, normalize = Divide, and out come two similarity matrices, one per direction. = 13. Loss gradients = The targets are identity matrices: a pair that belongs together should score 1, every other cell 0. Subtract the target from the similarity and you have the gradients, in both directions. The takeaway: pairing a picture with a sentence comes down to a single dot product. Everything before step 9 is the work of getting them into one shared space, so that the dot product finally means something. 💾 Save this post!

Tom Yeh

20,929 Aufrufe • vor 2 Monaten

Workflows vs. Graphs, clearly explained! workflows are great, and almost everyone has one. here is the ceiling: a workflow decides every step before it runs. you drew eight boxes in March. six months later the same three fire, every single time, and the other five have never once been reached. then a case arrives that nobody drew, and it goes to the closest wrong box. quietly, with a green status, because from the inside that looks exactly like success. Graph engineering fixes this by moving the decision: not what the steps do, but when the steps get chosen. you need both, and here is the sentence that resolves the whole confusion: a workflow decides the steps before it runs. a graph decides them while it runs. ↳ drawn in advance: the boxes, the branches, the order, the error path ↳ decided at runtime: how many units exist, what each one is allowed to see, which ones get created at all Prompts → Context → Harness → Loops → Graphs branches do not make it a graph. the branches were drawn in advance too, which means every one of them is a case you already thought of. the trick is knowing which part is allowed to be fixed. the node kinds are fixed. a splitter is a splitter, a gate is a gate, a merge is code. what is not fixed is how many of them exist this run, and that is decided after something has been read. one thing to know before you scale it. a workflow fails in a way that never pages anyone. ↳ the wrong branch ran, every check inside it passed, and the output is well formed ↳ nothing errored, because routing to the wrong box is not an error, it is a route that last one catches careful people. you cannot test your way out of it either, because the test suite was written from the same diagram that has the gap in it. and the one that eats whole nights: a workflow that has never surprised you is not stable, it is narrow. if it has run four hundred times and produced the same three shapes, it is not handling your work. it is handling the part of your work that fits it, and you have quietly stopped sending it the rest. below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open. save this and read it below ↓

Hanako

16,810 Aufrufe • vor 1 Monat

context engineering vs graph engineering. every few months the list gets a new word and everyone treats it as a replacement for the last one. these two are not on the same list. one decides what the model sees this turn, the other decides what exists at all. the cleanest way to tell them apart is to ask what a single unit of work looks like. > context engineering is the window the window opens empty, every single time. you assemble what goes in it. the prompt, the docs, the history, the tool results. the assembling is the work. the window only grows. it never shrinks on its own, so eventually something gets dropped. usually from the middle. usually without telling you. then the turn ends and the window is thrown away. not archived, thrown away. the next turn opens empty again and you re-explain what you already explained. good context engineering is knowing what to leave out, not what to pack in. the unit of work is one window. > graph engineering is the structure the same material arrives from the same sources. instead of packing it into a window, you pull entities out of it, resolve the duplicates into one node, and write typed edges between them. nothing here is stored as text you hope to find again. it is stored as a thing with a name and its connections to other things. when the turn ends, the graph is still there. the next turn does not start from zero. it starts by querying what already exists, and the query walks edges instead of guessing at similarity. good graph engineering is deciding what counts as the same thing twice. the unit of work is one relationship. > they are not alternatives the graph is what refills the window. context engineering decides what fits. graph engineering decides what there is to choose from. remove the graph and every session starts blind. remove the context work and the best structure in the world arrives as an unreadable dump. that also tells you which one broke. the answer drifted from what you actually said, or forgot something from this same session. that is the window. the answer is coherent but invents a connection that does not exist, or cannot join two facts it has clearly seen. that is the structure. people debug the prompt because the prompt is the easiest thing to edit. it keeps taking the blame for failures that live a layer down. save this - then read the full breakdown below

Hanako

19,160 Aufrufe • vor 2 Monaten

[CLIP] by Hand ✍️ The CLIP (Contrastive Language–Image Pre-training) model, a groundbreaking work by OpenAI, redefines the intersection of computer vision and natural language processing. It is the basis of all the multi-modal foundation models we see today. How does CLIP work? Goal: 🟨 Learn a shared embedding space for text and image [1] Given ↳ A mini batch of 3 text-image pairs ↳ OpenAI used 400 million text-image pairs to train its original CLIP model. Process 1st pair: "big table" [2] 🟪 Text → 2 Vectors (3D) ↳ Look up word embedding vectors using word2vec. [3] 🟩 Image → 2 Vectors (4D) ↳ Divide the image into two patches. ↳ Flatten each patch [4] Process other pairs ↳ Repeat [2]-[3] [5] 🟪 Text Encoder & 🟩 Image Encoder ↳ Encode input vectors into feature vectors ↳ Here, both encoders are simple one layer perceptron (linear + ReLU) ↳ In practice, the encoders are usually transformer models. [6] 🟪 🟩 Mean Pooling: 2 → 1 vector ↳ Average 2 feature vectors into a single vector by averaging across the columns ↳ The goal is to have one vector to represent each image or text [7] 🟪 🟩 -> 🟨 Projection ↳ Note that the text and image feature vectors from the encoders have different dimensions (3D vs. 4D). ↳ Use a linear layer to project image and text vectors to a 2D shared embedding space. 🏋️ Contrastive Pre-training 🏋️ [8] Prepare for MatMul ↳ Copy text vectors (T1,T2,T3) ↳ Copy the transpose of image vectors (I1,I2,I3) ↳ They are all in the 2D shared embedding space. [9] 🟦 MatMul ↳ Multiply T and I matrices. ↳ This is equivalent to taking dot product between every pair of image and text vectors. ↳ The purpose is to use dot product to estimate the similarity between a pair of image-text. [10] 🟦 Softmax: e^x ↳ Raise e to the power of the number in each cell ↳ To simplify hand calculation, we approximate e^□ with 3^□. [11] 🟦 Softmax: ∑ ↳ Sum each row for 🟩 image→🟪 text ↳ Sum each column for 🟪 text→ 🟩 image [12] 🟦 Softmax: 1 / sum ↳ Divide each element by the column sum to obtain a similarity matrix for 🟪 text→🟩 image ↳ Divide each element by the row sum to obtain a similarity matrix for 🟩 image→🟪 text [13] 🟥 Loss Gradients ↳ The "Targets" for the similarity matrices are Identity Matrices. ↳ Why? If I and T come from the same pair (i=j), we want the highest value, which is 1, and 0 otherwise. ↳ Apply the simple equation of [Similarity - Target] to compute gradients of for both directions. ↳ Why so simple? Because when Softmax and Cross-Entropy Loss are used together, the math magically works out that way. ↳ These gradients kick off the backpropagation process to update weights and biases of the encoders and projection layers (red borders).

Tom Yeh

67,924 Aufrufe • vor 2 Jahren