Skip to content

Commit

Permalink
Add edm option to ModelSamplingContinuousEDM for Cosmos.
Browse files Browse the repository at this point in the history
You can now use this node with "edm" selected to control the sigma_max and
sigma_min of the Cosmos model sampling.
  • Loading branch information
comfyanonymous committed Jan 11, 2025
1 parent 2ff3104 commit adea2be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion comfy_extras/nodes_model_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class ModelSamplingContinuousEDM:
@classmethod
def INPUT_TYPES(s):
return {"required": { "model": ("MODEL",),
"sampling": (["v_prediction", "edm_playground_v2.5", "eps"],),
"sampling": (["v_prediction", "edm", "edm_playground_v2.5", "eps"],),
"sigma_max": ("FLOAT", {"default": 120.0, "min": 0.0, "max": 1000.0, "step":0.001, "round": False}),
"sigma_min": ("FLOAT", {"default": 0.002, "min": 0.0, "max": 1000.0, "step":0.001, "round": False}),
}}
Expand All @@ -206,6 +206,9 @@ def patch(self, model, sampling, sigma_max, sigma_min):
sigma_data = 1.0
if sampling == "eps":
sampling_type = comfy.model_sampling.EPS
elif sampling == "edm":
sampling_type = comfy.model_sampling.EDM
sigma_data = 0.5
elif sampling == "v_prediction":
sampling_type = comfy.model_sampling.V_PREDICTION
elif sampling == "edm_playground_v2.5":
Expand Down

0 comments on commit adea2be

Please sign in to comment.