
CLICK EXPAND AND READ ME PLZ!
This ComfyUI workflow generates a Model Card for showcasing checkpoints or LoRAs.
A rewrite of the Model Card workflow by @Stevie2k8
V4 Beta 2
V4 Beta 2 is another complete rewrite to reduce memory usage and complexity.
This version uses Flow Control techniques together with Autoqueue in order to perform different actions separately in a controlled order.
Intermediary steps produce images that are saved into a project folder.
This version uses my custom IndustrialMagick node that requires you to install ImageMagick on your machine. This is an opensource command line application similar to photoshop or gimp, which is much more powerful and optimized than image manipulation within comfyUI.
Looking for feedbacks before adding more features.
Common issue resolution:
1. project folder not created
-
I use ComfyUI save node to create the project folder inside your ComfyUI output directory by saving an empty image.
-
The output directory path can be changed by modifying your run_cpu.bat or run_nvidia_gpu.bat start file. (these files only exist on ComfyUI Portable for windows)
By default, it is located in: `...\ComfyUI_windows_portable\ComfyUI\output` -
If the creation fails, which it should not, you can create the directory manually.
2. Error at the grid creation stage
-
You can check the actual image magick error in the logs in the comfyui cmd window before the same message as displayed in the error popup.
-
From my experience debugging the workflow, I believe the error will be because image magick cannot open one of the row_xx.png files listed in the rows.txt list file.
-
In that case, hit 0 or reset the view to go back to the control panel, below from the control flow group, you have a box to provide the absolute path to your comfyUI output directory. Please check that the path is valid.
-
You can also go to the project folder and open the rows.txt file to double check the paths of all row images.
3. Error at the card creation stage
-
This should not happen, but did happen in debugging and was corrected.
-
If the flow controls is not set properly or if you disable the random number generators, ComfyUI may skip the header or grid generation because their parameters did not change.
-
If this issue presents itself to you, you can disable the autoqueue, set the header and grid controllers to active, set the loopCount to the number of selected rows plus one (27 if you selected all 26 prompt groups) and queue. It will generate the header and grid, then you can set all values as before but also enable the card controller, generation will happen without error this time.
V4 Beta 2 Flow Control explanation:
Flow control serves two purposes in V4 beta 2.
Order of generation
You will notice a chain from the loop count value all the way to the autoqueue. That's called the signal. This is a technique to enforce that several steps happen before others.
Workflow routing
This workflow is designed to queue itself twice before starting to generate row images and once after. Before each queue the loop counter value will update and the workflow will activate or deactivate multiple stages.
Before I describe the order of operations, let's define some terms:
-
loopCount: is an integer value starting at -1. It keeps track of the current iteration. It acts as an index in a programmatic loop. It's maximum value will be one more than the number of prompt groups you select to generate, so if you select 3 it will be 4.
-
N: represents the number of prompt groups selected. loopCount maximum value will be N+1.
-
Controllers: ComfyUI has a specific order of operations. It will only execute nodes in a branch that ends with a saving or preview node.This allows us to activate or deactivate a route or diagram branch by disabling the saving or preview node at its end. I have put these nodes into separate groups called controllers.
-
In the following flow explanation, I will write [autoqueue] to represent the last action in a workflow. That action is different whether you have activated the autoqueue option in the workflow or not. In the former case, it corresponds to the last node in the workflow queueing itself, in the latter, it corresponds to you the user queueing the workflow at the end of its execution.
Flow control works as follow:
Before you queue for the first time, ensure that:
-
all controllers are set to NO (disabled).
-
the value of loopCount is set to -1
You queue once.
STEP -1
The workflow enables two controllers:
-
folder creation
-
rows.txt text file reset
The workflow updates the value of loopCount to 0.
[autoqueue]
STEP 0
The workflow runs:
-
folder creation
-
rows.txt text file reset
The workflow disables two controllers:
-
folder creation
-
rows.txt text file reset
The workflow enables three controllers:
-
row
-
row2
-
save row image name to rows.txt
The workflow updates the value of loopCount to 1.
[autoqueue]
STEP 1 to STEP N-1
The workflow runs:
-
row
-
row2
-
save row image name to rows.txt
The workflow updates the value of loopCount by 1.
[autoqueue]
STEP N
The workflow runs:
-
row
-
row2
-
save row image name to rows.txt
The workflow disables three controllers:
-
row
-
row2
-
save row image name to rows.txt
The workflow enables three controllers:
-
header
-
grid
-
card
The workflow updates the value of loopCount to N+1.
[autoqueue]
STEP N+1
The workflow runs:
-
header
-
grid
-
card
The workflow disables three controllers:
-
header
-
grid
-
card
The workflow updates the value of loopCount to -1.
No queue, the workflow executed completely.
V4 Beta 1
I am trying to reduce the memory load from V3.
In V4 I saw significant reduction of the RAM in use after an initial peak.
Looking for feedbacks before adding more features.
V3 Status
Issues:
-
Group Average gen times: check formula
-
Global generation times: not working, issue with lists
-
VRAM hungry
Description
This workflow generates a customizable Model Card.
Header
-
Can be toggled on or off entirely.
-
Logo to the left, toggable.
-
Generation info.
-
Baner to the right, toggable.
Grid body
-
Customizable number of columns (recommended values: 1 or 2).
-
Toggable prompt groups (26).
-
Customizable max number of images per group (recommended <8).
-
Supports groups of different sizes.
-
Each group prints one headline.
-
Each group may print one description.
-
Each image in group prints a label.
V3 exclusive
-
Each image may print a generation time, toggable.
-
(broken) Each group may print a total or average generation time.
-
(planned) Total or global average generation time may print to the header.
Use
-
You may clone this repository into the
pysssss-workflows
ComfyUI subdirectory. -
Load the
.json
file. -
Install missing nodes using the ComfyUI Manager.
-
(V3) Install my custom node "KSamplerTimer" for Version 3.
-
Set checkpoint settings.
-
Set default sd1.5 & sdxl image sizes.
-
Set LoRA settings if needed.
-
Set template (columns).
-
Toggle groups to generate.
-
(V2) Toggle "just the right amount" of "batch"es.
-
(Recommended) Disable generation and dry fire.
-
Queue workflow
FAQ
-
I cannot find the custom node "workflow/xxx".
This workflow uses "group nodes" which is a built in feature that groups nodes together. If a group node is red, it's most likely because you are missing a custom node inside the group node. Try installing missing custom nodes from the ComfyUI Manager.
Alternatively, inspect the missing node errors in the ComfyUI console to find which custom nodes to install.
Changes
V 3.0.2
-
Updated Hair prompts
-
Updated Headlines
-
Updated Descriptions
-
Updated Labels
-
Fixed bugs:
-
Mismatched Headlines.
-
Mismatched negative prompts.
-
Mismatched labels.
-
V 3.0.1
-
Fixed bugs
V 3.0.0
-
Complete refactor.
-
Swapped native KSampler for custom KSamplerTimer.
-
Supports batch generation with checkpoints configuration from file.
-
Exposes negative prompts and seeds to user.
-
Generates all images in one sampler run (list not batch). => Always regenerates all images.
-
Adds ability to print generation times.
-
Improved GUI:
-
Toggles are black.
-
Anything Everywhere declarations are gold.
-
Number of column is red.
-
Save location controls moved to top.
-
Custom LoRA controls moved to top.
-
Reorganized variable columns.
-
-
Fixed bugs
V 2.0.0
-
Refactor.
-
Swapped multiple custom nodes (maths, simple & multiline strings).
-
Improved GUI:
-
Reorganized nodes in columns by functions.
-
Color coded node groups.
-
Annotations for users.
-
-
Removed save to jpg.
描述:
V 3.0.2
+ Fixed Headlines bug
+ Updated Descriptions
+ Updated Prompts
+ Fixed Negative Prompts
+ Fixed Labels
V 3.0.1
+ Fixed minor bugs
+ Fixed Checkpoint from file mode detection
V 3.0.0
Complete refactor.
+ Added generation times using KSamplerTimer (see my models)
+ Supports controls from text file
+ Better LCM Lightning LoRA
+ Finer generation controls
+ Single batch sampler
+ Logo ControlNet
Known Issues:
(Help appreciated)
-
Global Average Generation Time computation (int list issue)
-
Individual image NSFW borders (img batch list + string list issue)
训练词语:
名称: modelCard_v30.zip
大小 (KB): 84
类型: Archive
Pickle 扫描结果: Success
Pickle 扫描信息: No Pickle imports
病毒扫描结果: Success