File size: 744 Bytes
82ea528 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import comfy.sd
import comfy.model_sampling
import comfy.latent_formats
import nodes
class AddFluxFlowNode:
@classmethod
def INPUT_TYPES(s):
return {"required": { "model": ("MODEL",),
"flow": ("FLOW",),
}}
RETURN_TYPES = ("MODEL",)
FUNCTION = "patch"
CATEGORY = "fluxtapoz"
def patch(self, model, flow):
m = model.clone()
model_options = {**model.model_options}
model.model_options = model_options
transformer_options = {**model.model_options.get('transformer_options', {})}
model.model_options['transformer_options'] = transformer_options
transformer_options['FLOW'] = flow
return (m, )
|