#Difficulty using noise_seed with custom workflow in Generate tab

1 messages · Page 1 of 1 (latest)

craggy owl
#

On a simple custom workflow using swarmKsampler if I make the noise_seed not advanced and try to run the network I get an error. If I keep it advance it runs fine. Trying to get the noise seed to be handled properly and saved with runs etc. My noise seed is -1 (to be randome) The error is a minValue greater than maxValue The error content is

2024-12-04 13:07:09.952 [Error] Error in websocket handler: System.AggregateException: One or more errors occurred. (Invalid value for parameter noise_seed)
---> System.Exception: Invalid value for parameter noise_seed
---> System.ArgumentOutOfRangeException: 'minValue' cannot be greater than maxValue. (Parameter 'minValue')
at System.Random.ThrowMinMaxValueSwapped()
at System.Random.ThreadSafeRandom.Next(Int32 minValue, Int32 maxValue)
at SwarmUI.Builtin_ComfyUIBackend.ComfyUIBackendExtension.<>c__DisplayClass20_0.<DynamicParamGenerator>g__seedClean|0(String prior, String newVal) in C:\Users\kenny\Documents\AI\SwarmUI\src\BuiltinExtensions\ComfyUIBackend\ComfyUIBackendExtension.cs:line 190
at SwarmUI.Text2Image.T2IParamInput.Set(T2IParamType param, String val) in C:\Users\kenny\Documents\AI\SwarmUI\src\Text2Image\T2IParamInput.cs:line 1132
at SwarmUI.Text2Image.T2IParamTypes.ApplyParameter(String paramTypeName, String value, T2IParamInput data) in C:\Users\kenny\Documents\AI\SwarmUI\src\Text2Image\T2IParamTypes.cs:line 889
--- End of inner exception stack trace ---
at SwarmUI.Text2Image.T2IParamTypes.ApplyParameter(String paramTypeName, String value, T2IParamInput data) in C:\Users\kenny\Documents\AI\SwarmUI\src\Text2Image\T2IParamTypes.cs:line 897
at SwarmUI.WebAPI.T2IAPI.RequestToParams(Session session, JObject rawInput) in C:\Users\kenny\Documents\AI\SwarmUI\src\WebAPI\T2IAPI.cs:line 207
at SwarmUI.WebAPI.T2IAPI.GenT2I_Internal(Session session, ValueTuple4 input, Action1 output, Boolean isWS) in C:\Users\kenny\Documents\AI\SwarmUI\src\WebAPI\T2IAPI.cs:line 252

craggy owl
#

This happens with the example BasicSDXL workflow for me as well if I make the seed not advanced

iron stratus
craggy owl
#

I can reproduce via

  • start swarmui
  • disable custom workflow if one is already loaded on the Generate tab
  • go to the comfy Workflow tab
  • click Import from Generate tab (getting the default workflow?)
  • click use this Workflow in Generate Tab
  • go back to generate tab, now it is a custom workflow
  • click display advanced options
  • enable (make non advanced) noise_seed on the swarmKsampler
  • hit generate to get the error

What I am trying to do is properly create a workflow where SwarmUI can drive it from the generate page, and properly record the parameters such as seed etc so I can reproduce, but getting stuck when I make the noise_seed public and it yerks. If the noise_seed stays advanced the generate is succesful if that helps.

iron stratus
#

enable (make non advanced) noise_seed on the swarmKsampler
Aaaah enable the param lol

#

ftr "make non advanced" is not an accurate description of that action at all

craggy owl
#

oops

#

enable is more like record the param? or override the underlying workflow value?

iron stratus
#

override the underlying workflow value? yes this one

#

bug fixed, update to latest

craggy owl
#

ahh thanks

#

verified the fix
was that a type overflow wrapping around on type.Max to int?

iron stratus
#

yes

#

the comfy internal seed max is 2^64