The rationale behind this change is to shut up my typechecker when I'm working with ComfyScript and I'm not able to generate stubs for all known files ahead of time. A good example is when working with Modal, as in examples/modal.py.
One downside to this change is that it also adds '| str' to the enums that are completely known ahead of time, like Samplers or Schedulers, since I wasn't sure how to differentiate them.
Hello!
The rationale behind this change is to shut up my typechecker when I'm working with ComfyScript and I'm not able to generate stubs for all known files ahead of time. A good example is when working with Modal, as in
examples/modal.py
.One downside to this change is that it also adds '| str' to the enums that are completely known ahead of time, like Samplers or Schedulers, since I wasn't sure how to differentiate them.
Before:
def __new__(cls, ckpt_name: Checkpoints) -> tuple[Model, Clip, Vae]: ...
After:def __new__(cls, ckpt_name: Checkpoints | str) -> tuple[Model, Clip, Vae]: ...