Add example
This commit is contained in:
parent
24a7edfca6
commit
d29e95d707
589
examples/mochi_fastercache_test_01.json
Normal file
589
examples/mochi_fastercache_test_01.json
Normal file
@ -0,0 +1,589 @@
|
||||
{
|
||||
"last_node_id": 24,
|
||||
"last_link_id": 38,
|
||||
"nodes": [
|
||||
{
|
||||
"id": 1,
|
||||
"type": "MochiTextEncode",
|
||||
"pos": {
|
||||
"0": 483,
|
||||
"1": 281
|
||||
},
|
||||
"size": {
|
||||
"0": 381.8630676269531,
|
||||
"1": 227.23898315429688
|
||||
},
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"link": 1
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "conditioning",
|
||||
"type": "CONDITIONING",
|
||||
"links": [
|
||||
17
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"links": [
|
||||
20
|
||||
],
|
||||
"slot_index": 1
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "MochiTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"nature video of a red panda eating bamboo in front of a waterfall",
|
||||
1,
|
||||
false
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"type": "MochiTextEncode",
|
||||
"pos": {
|
||||
"0": 487,
|
||||
"1": 563
|
||||
},
|
||||
"size": {
|
||||
"0": 378.8630676269531,
|
||||
"1": 183.64430236816406
|
||||
},
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"link": 20
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "conditioning",
|
||||
"type": "CONDITIONING",
|
||||
"links": [
|
||||
18,
|
||||
21
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "MochiTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"",
|
||||
1,
|
||||
true
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": "CLIPLoader",
|
||||
"pos": {
|
||||
"0": -29,
|
||||
"1": 311
|
||||
},
|
||||
"size": {
|
||||
"0": 479.53594970703125,
|
||||
"1": 82
|
||||
},
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [
|
||||
1
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "CLIPLoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"t5\\google_t5-v1_1-xxl_encoderonly-fp8_e4m3fn.safetensors",
|
||||
"sd3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"type": "MochiSigmaSchedule",
|
||||
"pos": {
|
||||
"0": 546,
|
||||
"1": -405
|
||||
},
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 130
|
||||
},
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "sigmas",
|
||||
"type": "SIGMAS",
|
||||
"links": [
|
||||
30
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "MochiSigmaSchedule"
|
||||
},
|
||||
"widgets_values": [
|
||||
30,
|
||||
0.025,
|
||||
5,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"type": "MochiDecodeSpatialTiling",
|
||||
"pos": {
|
||||
"0": 1378,
|
||||
"1": 171
|
||||
},
|
||||
"size": {
|
||||
"0": 390.5999755859375,
|
||||
"1": 198
|
||||
},
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "vae",
|
||||
"type": "MOCHIVAE",
|
||||
"link": 29
|
||||
},
|
||||
{
|
||||
"name": "samples",
|
||||
"type": "LATENT",
|
||||
"link": 28
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
36
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "MochiDecodeSpatialTiling"
|
||||
},
|
||||
"widgets_values": [
|
||||
true,
|
||||
4,
|
||||
4,
|
||||
16,
|
||||
1,
|
||||
26
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"type": "VHS_VideoCombine",
|
||||
"pos": {
|
||||
"0": 1960,
|
||||
"1": -5
|
||||
},
|
||||
"size": [
|
||||
350.4304504394531,
|
||||
511.036104022332
|
||||
],
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 36
|
||||
},
|
||||
{
|
||||
"name": "audio",
|
||||
"type": "AUDIO",
|
||||
"link": null,
|
||||
"shape": 7
|
||||
},
|
||||
{
|
||||
"name": "meta_batch",
|
||||
"type": "VHS_BatchManager",
|
||||
"link": null,
|
||||
"shape": 7
|
||||
},
|
||||
{
|
||||
"name": "vae",
|
||||
"type": "VAE",
|
||||
"link": null,
|
||||
"shape": 7
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "Filenames",
|
||||
"type": "VHS_FILENAMES",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "VHS_VideoCombine"
|
||||
},
|
||||
"widgets_values": {
|
||||
"frame_rate": 24,
|
||||
"loop_count": 0,
|
||||
"filename_prefix": "AnimateDiff",
|
||||
"format": "video/h264-mp4",
|
||||
"pix_fmt": "yuv420p",
|
||||
"crf": 19,
|
||||
"save_metadata": true,
|
||||
"pingpong": false,
|
||||
"save_output": false,
|
||||
"videopreview": {
|
||||
"hidden": false,
|
||||
"paused": false,
|
||||
"params": {
|
||||
"filename": "AnimateDiff_00009.mp4",
|
||||
"subfolder": "",
|
||||
"type": "temp",
|
||||
"format": "video/h264-mp4",
|
||||
"frame_rate": 24
|
||||
},
|
||||
"muted": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"type": "MochiSampler",
|
||||
"pos": {
|
||||
"0": 1059,
|
||||
"1": 248
|
||||
},
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 322
|
||||
},
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MOCHIMODEL",
|
||||
"link": 16
|
||||
},
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"link": 17
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"link": 18
|
||||
},
|
||||
{
|
||||
"name": "opt_sigmas",
|
||||
"type": "SIGMAS",
|
||||
"link": 30,
|
||||
"shape": 7
|
||||
},
|
||||
{
|
||||
"name": "cfg_schedule",
|
||||
"type": "FLOAT",
|
||||
"link": null,
|
||||
"widget": {
|
||||
"name": "cfg_schedule"
|
||||
},
|
||||
"shape": 7
|
||||
},
|
||||
{
|
||||
"name": "fastercache",
|
||||
"type": "FASTERCACHEARGS",
|
||||
"link": 38,
|
||||
"shape": 7
|
||||
},
|
||||
{
|
||||
"name": "samples",
|
||||
"type": "LATENT",
|
||||
"link": null,
|
||||
"shape": 7
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "samples",
|
||||
"type": "LATENT",
|
||||
"links": [
|
||||
28
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "MochiSampler"
|
||||
},
|
||||
"widgets_values": [
|
||||
848,
|
||||
480,
|
||||
49,
|
||||
30,
|
||||
4.5,
|
||||
0,
|
||||
"fixed",
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"type": "Note",
|
||||
"pos": {
|
||||
"0": 911,
|
||||
"1": -333
|
||||
},
|
||||
"size": [
|
||||
373.7741072275978,
|
||||
140.2894855878708
|
||||
],
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"title": "Note: FasterCache",
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"I don't know the best options yet, but this was first config that worked. It's important to set the linear steps to about half of the FasterCache start_step."
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": "DownloadAndLoadMochiModel",
|
||||
"pos": {
|
||||
"0": 489,
|
||||
"1": 20
|
||||
},
|
||||
"size": {
|
||||
"0": 366.639404296875,
|
||||
"1": 198
|
||||
},
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "trigger",
|
||||
"type": "CONDITIONING",
|
||||
"link": 21,
|
||||
"shape": 7
|
||||
},
|
||||
{
|
||||
"name": "compile_args",
|
||||
"type": "MOCHICOMPILEARGS",
|
||||
"link": null,
|
||||
"shape": 7
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "mochi_model",
|
||||
"type": "MOCHIMODEL",
|
||||
"links": [
|
||||
16
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "mochi_vae",
|
||||
"type": "MOCHIVAE",
|
||||
"links": [
|
||||
29
|
||||
],
|
||||
"slot_index": 1
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "DownloadAndLoadMochiModel"
|
||||
},
|
||||
"widgets_values": [
|
||||
"mochi_preview_dit_GGUF_Q8_0.safetensors",
|
||||
"mochi_preview_vae_decoder_bf16.safetensors",
|
||||
"fp8_e4m3fn",
|
||||
"comfy",
|
||||
false,
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"type": "MochiFasterCache",
|
||||
"pos": {
|
||||
"0": 548,
|
||||
"1": -226
|
||||
},
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 130
|
||||
},
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "fastercache",
|
||||
"type": "FASTERCACHEARGS",
|
||||
"links": [
|
||||
38
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "MochiFasterCache"
|
||||
},
|
||||
"widgets_values": [
|
||||
10,
|
||||
22,
|
||||
28,
|
||||
"main_device"
|
||||
]
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
"CLIP"
|
||||
],
|
||||
[
|
||||
16,
|
||||
4,
|
||||
0,
|
||||
14,
|
||||
0,
|
||||
"MOCHIMODEL"
|
||||
],
|
||||
[
|
||||
17,
|
||||
1,
|
||||
0,
|
||||
14,
|
||||
1,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
18,
|
||||
8,
|
||||
0,
|
||||
14,
|
||||
2,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
20,
|
||||
1,
|
||||
1,
|
||||
8,
|
||||
0,
|
||||
"CLIP"
|
||||
],
|
||||
[
|
||||
21,
|
||||
8,
|
||||
0,
|
||||
4,
|
||||
0,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
28,
|
||||
14,
|
||||
0,
|
||||
15,
|
||||
1,
|
||||
"LATENT"
|
||||
],
|
||||
[
|
||||
29,
|
||||
4,
|
||||
1,
|
||||
15,
|
||||
0,
|
||||
"MOCHIVAE"
|
||||
],
|
||||
[
|
||||
30,
|
||||
19,
|
||||
0,
|
||||
14,
|
||||
3,
|
||||
"SIGMAS"
|
||||
],
|
||||
[
|
||||
36,
|
||||
15,
|
||||
0,
|
||||
24,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
38,
|
||||
21,
|
||||
0,
|
||||
14,
|
||||
5,
|
||||
"FASTERCACHEARGS"
|
||||
]
|
||||
],
|
||||
"groups": [],
|
||||
"config": {},
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.8264462809917354,
|
||||
"offset": [
|
||||
339.77926679583993,
|
||||
511.08138843556674
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
2
nodes.py
2
nodes.py
@ -463,7 +463,7 @@ class MochiFasterCache:
|
||||
RETURN_NAMES = ("fastercache", )
|
||||
FUNCTION = "args"
|
||||
CATEGORY = "CogVideoWrapper"
|
||||
DESCRIPTION = "FasterCache (https://github.com/Vchitect/FasterCache) settings for the MochiWrapper"
|
||||
DESCRIPTION = "FasterCache (https://github.com/Vchitect/FasterCache) settings for the MochiWrapper, increases speed of sampling with cost of memory use and quality"
|
||||
|
||||
def args(self, start_step, hf_step, lf_step, cache_device):
|
||||
device = mm.get_torch_device()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user