horde-engine 2.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of horde-engine might be problematic. Click here for more details.

Files changed (895) hide show
  1. horde_engine-2.8.2.dist-info/LICENSE +661 -0
  2. horde_engine-2.8.2.dist-info/METADATA +991 -0
  3. horde_engine-2.8.2.dist-info/RECORD +895 -0
  4. horde_engine-2.8.2.dist-info/WHEEL +5 -0
  5. horde_engine-2.8.2.dist-info/entry_points.txt +3 -0
  6. horde_engine-2.8.2.dist-info/top_level.txt +1 -0
  7. hordelib/__init__.py +12 -0
  8. hordelib/__pyinstaller.py +10 -0
  9. hordelib/_comfyui/.gitignore +18 -0
  10. hordelib/_comfyui/CODEOWNERS +1 -0
  11. hordelib/_comfyui/LICENSE +674 -0
  12. hordelib/_comfyui/README.md +224 -0
  13. hordelib/_comfyui/__pycache__/cuda_malloc.cpython-310.pyc +0 -0
  14. hordelib/_comfyui/__pycache__/execution.cpython-310.pyc +0 -0
  15. hordelib/_comfyui/__pycache__/folder_paths.cpython-310.pyc +0 -0
  16. hordelib/_comfyui/__pycache__/latent_preview.cpython-310.pyc +0 -0
  17. hordelib/_comfyui/__pycache__/node_helpers.cpython-310.pyc +0 -0
  18. hordelib/_comfyui/__pycache__/nodes.cpython-310.pyc +0 -0
  19. hordelib/_comfyui/__pycache__/server.cpython-310.pyc +0 -0
  20. hordelib/_comfyui/app/__pycache__/app_settings.cpython-310.pyc +0 -0
  21. hordelib/_comfyui/app/__pycache__/user_manager.cpython-310.pyc +0 -0
  22. hordelib/_comfyui/app/app_settings.py +54 -0
  23. hordelib/_comfyui/app/user_manager.py +140 -0
  24. hordelib/_comfyui/comfy/__pycache__/checkpoint_pickle.cpython-310.pyc +0 -0
  25. hordelib/_comfyui/comfy/__pycache__/cli_args.cpython-310.pyc +0 -0
  26. hordelib/_comfyui/comfy/__pycache__/clip_model.cpython-310.pyc +0 -0
  27. hordelib/_comfyui/comfy/__pycache__/clip_vision.cpython-310.pyc +0 -0
  28. hordelib/_comfyui/comfy/__pycache__/conds.cpython-310.pyc +0 -0
  29. hordelib/_comfyui/comfy/__pycache__/controlnet.cpython-310.pyc +0 -0
  30. hordelib/_comfyui/comfy/__pycache__/diffusers_convert.cpython-310.pyc +0 -0
  31. hordelib/_comfyui/comfy/__pycache__/diffusers_load.cpython-310.pyc +0 -0
  32. hordelib/_comfyui/comfy/__pycache__/gligen.cpython-310.pyc +0 -0
  33. hordelib/_comfyui/comfy/__pycache__/latent_formats.cpython-310.pyc +0 -0
  34. hordelib/_comfyui/comfy/__pycache__/lora.cpython-310.pyc +0 -0
  35. hordelib/_comfyui/comfy/__pycache__/model_base.cpython-310.pyc +0 -0
  36. hordelib/_comfyui/comfy/__pycache__/model_detection.cpython-310.pyc +0 -0
  37. hordelib/_comfyui/comfy/__pycache__/model_management.cpython-310.pyc +0 -0
  38. hordelib/_comfyui/comfy/__pycache__/model_patcher.cpython-310.pyc +0 -0
  39. hordelib/_comfyui/comfy/__pycache__/model_sampling.cpython-310.pyc +0 -0
  40. hordelib/_comfyui/comfy/__pycache__/ops.cpython-310.pyc +0 -0
  41. hordelib/_comfyui/comfy/__pycache__/options.cpython-310.pyc +0 -0
  42. hordelib/_comfyui/comfy/__pycache__/sample.cpython-310.pyc +0 -0
  43. hordelib/_comfyui/comfy/__pycache__/sampler_helpers.cpython-310.pyc +0 -0
  44. hordelib/_comfyui/comfy/__pycache__/samplers.cpython-310.pyc +0 -0
  45. hordelib/_comfyui/comfy/__pycache__/sd.cpython-310.pyc +0 -0
  46. hordelib/_comfyui/comfy/__pycache__/sd1_clip.cpython-310.pyc +0 -0
  47. hordelib/_comfyui/comfy/__pycache__/sd2_clip.cpython-310.pyc +0 -0
  48. hordelib/_comfyui/comfy/__pycache__/sdxl_clip.cpython-310.pyc +0 -0
  49. hordelib/_comfyui/comfy/__pycache__/supported_models.cpython-310.pyc +0 -0
  50. hordelib/_comfyui/comfy/__pycache__/supported_models_base.cpython-310.pyc +0 -0
  51. hordelib/_comfyui/comfy/__pycache__/utils.cpython-310.pyc +0 -0
  52. hordelib/_comfyui/comfy/checkpoint_pickle.py +13 -0
  53. hordelib/_comfyui/comfy/cldm/__pycache__/cldm.cpython-310.pyc +0 -0
  54. hordelib/_comfyui/comfy/cldm/cldm.py +312 -0
  55. hordelib/_comfyui/comfy/cli_args.py +136 -0
  56. hordelib/_comfyui/comfy/clip_config_bigg.json +23 -0
  57. hordelib/_comfyui/comfy/clip_model.py +194 -0
  58. hordelib/_comfyui/comfy/clip_vision.py +117 -0
  59. hordelib/_comfyui/comfy/clip_vision_config_g.json +18 -0
  60. hordelib/_comfyui/comfy/clip_vision_config_h.json +18 -0
  61. hordelib/_comfyui/comfy/clip_vision_config_vitl.json +18 -0
  62. hordelib/_comfyui/comfy/conds.py +78 -0
  63. hordelib/_comfyui/comfy/controlnet.py +554 -0
  64. hordelib/_comfyui/comfy/diffusers_convert.py +281 -0
  65. hordelib/_comfyui/comfy/diffusers_load.py +36 -0
  66. hordelib/_comfyui/comfy/extra_samplers/__pycache__/uni_pc.cpython-310.pyc +0 -0
  67. hordelib/_comfyui/comfy/extra_samplers/uni_pc.py +875 -0
  68. hordelib/_comfyui/comfy/gligen.py +343 -0
  69. hordelib/_comfyui/comfy/k_diffusion/__pycache__/sampling.cpython-310.pyc +0 -0
  70. hordelib/_comfyui/comfy/k_diffusion/__pycache__/utils.cpython-310.pyc +0 -0
  71. hordelib/_comfyui/comfy/k_diffusion/sampling.py +810 -0
  72. hordelib/_comfyui/comfy/k_diffusion/utils.py +313 -0
  73. hordelib/_comfyui/comfy/latent_formats.py +104 -0
  74. hordelib/_comfyui/comfy/ldm/__pycache__/util.cpython-310.pyc +0 -0
  75. hordelib/_comfyui/comfy/ldm/cascade/__pycache__/common.cpython-310.pyc +0 -0
  76. hordelib/_comfyui/comfy/ldm/cascade/__pycache__/controlnet.cpython-310.pyc +0 -0
  77. hordelib/_comfyui/comfy/ldm/cascade/__pycache__/stage_a.cpython-310.pyc +0 -0
  78. hordelib/_comfyui/comfy/ldm/cascade/__pycache__/stage_b.cpython-310.pyc +0 -0
  79. hordelib/_comfyui/comfy/ldm/cascade/__pycache__/stage_c.cpython-310.pyc +0 -0
  80. hordelib/_comfyui/comfy/ldm/cascade/__pycache__/stage_c_coder.cpython-310.pyc +0 -0
  81. hordelib/_comfyui/comfy/ldm/cascade/common.py +161 -0
  82. hordelib/_comfyui/comfy/ldm/cascade/controlnet.py +93 -0
  83. hordelib/_comfyui/comfy/ldm/cascade/stage_a.py +255 -0
  84. hordelib/_comfyui/comfy/ldm/cascade/stage_b.py +257 -0
  85. hordelib/_comfyui/comfy/ldm/cascade/stage_c.py +274 -0
  86. hordelib/_comfyui/comfy/ldm/cascade/stage_c_coder.py +95 -0
  87. hordelib/_comfyui/comfy/ldm/models/__pycache__/autoencoder.cpython-310.pyc +0 -0
  88. hordelib/_comfyui/comfy/ldm/models/autoencoder.py +228 -0
  89. hordelib/_comfyui/comfy/ldm/modules/__pycache__/attention.cpython-310.pyc +0 -0
  90. hordelib/_comfyui/comfy/ldm/modules/__pycache__/ema.cpython-310.pyc +0 -0
  91. hordelib/_comfyui/comfy/ldm/modules/__pycache__/sub_quadratic_attention.cpython-310.pyc +0 -0
  92. hordelib/_comfyui/comfy/ldm/modules/attention.py +801 -0
  93. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/__init__.py +0 -0
  94. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/__pycache__/__init__.cpython-310.pyc +0 -0
  95. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/__pycache__/model.cpython-310.pyc +0 -0
  96. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/__pycache__/openaimodel.cpython-310.pyc +0 -0
  97. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/__pycache__/upscaling.cpython-310.pyc +0 -0
  98. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/__pycache__/util.cpython-310.pyc +0 -0
  99. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/model.py +651 -0
  100. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/openaimodel.py +890 -0
  101. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/upscaling.py +85 -0
  102. hordelib/_comfyui/comfy/ldm/modules/diffusionmodules/util.py +306 -0
  103. hordelib/_comfyui/comfy/ldm/modules/distributions/__init__.py +0 -0
  104. hordelib/_comfyui/comfy/ldm/modules/distributions/__pycache__/__init__.cpython-310.pyc +0 -0
  105. hordelib/_comfyui/comfy/ldm/modules/distributions/__pycache__/distributions.cpython-310.pyc +0 -0
  106. hordelib/_comfyui/comfy/ldm/modules/distributions/distributions.py +92 -0
  107. hordelib/_comfyui/comfy/ldm/modules/ema.py +80 -0
  108. hordelib/_comfyui/comfy/ldm/modules/encoders/__init__.py +0 -0
  109. hordelib/_comfyui/comfy/ldm/modules/encoders/__pycache__/__init__.cpython-310.pyc +0 -0
  110. hordelib/_comfyui/comfy/ldm/modules/encoders/__pycache__/noise_aug_modules.cpython-310.pyc +0 -0
  111. hordelib/_comfyui/comfy/ldm/modules/encoders/noise_aug_modules.py +35 -0
  112. hordelib/_comfyui/comfy/ldm/modules/sub_quadratic_attention.py +274 -0
  113. hordelib/_comfyui/comfy/ldm/modules/temporal_ae.py +245 -0
  114. hordelib/_comfyui/comfy/ldm/util.py +197 -0
  115. hordelib/_comfyui/comfy/lora.py +241 -0
  116. hordelib/_comfyui/comfy/model_base.py +559 -0
  117. hordelib/_comfyui/comfy/model_detection.py +383 -0
  118. hordelib/_comfyui/comfy/model_management.py +877 -0
  119. hordelib/_comfyui/comfy/model_patcher.py +485 -0
  120. hordelib/_comfyui/comfy/model_sampling.py +203 -0
  121. hordelib/_comfyui/comfy/ops.py +163 -0
  122. hordelib/_comfyui/comfy/options.py +6 -0
  123. hordelib/_comfyui/comfy/sample.py +44 -0
  124. hordelib/_comfyui/comfy/sampler_helpers.py +76 -0
  125. hordelib/_comfyui/comfy/samplers.py +755 -0
  126. hordelib/_comfyui/comfy/sd.py +626 -0
  127. hordelib/_comfyui/comfy/sd1_clip.py +521 -0
  128. hordelib/_comfyui/comfy/sd1_clip_config.json +25 -0
  129. hordelib/_comfyui/comfy/sd1_tokenizer/merges.txt +48895 -0
  130. hordelib/_comfyui/comfy/sd1_tokenizer/special_tokens_map.json +24 -0
  131. hordelib/_comfyui/comfy/sd1_tokenizer/tokenizer_config.json +34 -0
  132. hordelib/_comfyui/comfy/sd1_tokenizer/vocab.json +49410 -0
  133. hordelib/_comfyui/comfy/sd2_clip.py +24 -0
  134. hordelib/_comfyui/comfy/sd2_clip_config.json +23 -0
  135. hordelib/_comfyui/comfy/sdxl_clip.py +88 -0
  136. hordelib/_comfyui/comfy/supported_models.py +481 -0
  137. hordelib/_comfyui/comfy/supported_models_base.py +95 -0
  138. hordelib/_comfyui/comfy/t2i_adapter/__pycache__/adapter.cpython-310.pyc +0 -0
  139. hordelib/_comfyui/comfy/t2i_adapter/adapter.py +293 -0
  140. hordelib/_comfyui/comfy/taesd/__pycache__/taesd.cpython-310.pyc +0 -0
  141. hordelib/_comfyui/comfy/taesd/taesd.py +77 -0
  142. hordelib/_comfyui/comfy/utils.py +483 -0
  143. hordelib/_comfyui/comfy_extras/__pycache__/nodes_align_your_steps.cpython-310.pyc +0 -0
  144. hordelib/_comfyui/comfy_extras/__pycache__/nodes_canny.cpython-310.pyc +0 -0
  145. hordelib/_comfyui/comfy_extras/__pycache__/nodes_clip_sdxl.cpython-310.pyc +0 -0
  146. hordelib/_comfyui/comfy_extras/__pycache__/nodes_compositing.cpython-310.pyc +0 -0
  147. hordelib/_comfyui/comfy_extras/__pycache__/nodes_cond.cpython-310.pyc +0 -0
  148. hordelib/_comfyui/comfy_extras/__pycache__/nodes_custom_sampler.cpython-310.pyc +0 -0
  149. hordelib/_comfyui/comfy_extras/__pycache__/nodes_differential_diffusion.cpython-310.pyc +0 -0
  150. hordelib/_comfyui/comfy_extras/__pycache__/nodes_freelunch.cpython-310.pyc +0 -0
  151. hordelib/_comfyui/comfy_extras/__pycache__/nodes_hypernetwork.cpython-310.pyc +0 -0
  152. hordelib/_comfyui/comfy_extras/__pycache__/nodes_hypertile.cpython-310.pyc +0 -0
  153. hordelib/_comfyui/comfy_extras/__pycache__/nodes_images.cpython-310.pyc +0 -0
  154. hordelib/_comfyui/comfy_extras/__pycache__/nodes_ip2p.cpython-310.pyc +0 -0
  155. hordelib/_comfyui/comfy_extras/__pycache__/nodes_latent.cpython-310.pyc +0 -0
  156. hordelib/_comfyui/comfy_extras/__pycache__/nodes_mask.cpython-310.pyc +0 -0
  157. hordelib/_comfyui/comfy_extras/__pycache__/nodes_model_advanced.cpython-310.pyc +0 -0
  158. hordelib/_comfyui/comfy_extras/__pycache__/nodes_model_downscale.cpython-310.pyc +0 -0
  159. hordelib/_comfyui/comfy_extras/__pycache__/nodes_model_merging.cpython-310.pyc +0 -0
  160. hordelib/_comfyui/comfy_extras/__pycache__/nodes_model_merging_model_specific.cpython-310.pyc +0 -0
  161. hordelib/_comfyui/comfy_extras/__pycache__/nodes_morphology.cpython-310.pyc +0 -0
  162. hordelib/_comfyui/comfy_extras/__pycache__/nodes_pag.cpython-310.pyc +0 -0
  163. hordelib/_comfyui/comfy_extras/__pycache__/nodes_perpneg.cpython-310.pyc +0 -0
  164. hordelib/_comfyui/comfy_extras/__pycache__/nodes_photomaker.cpython-310.pyc +0 -0
  165. hordelib/_comfyui/comfy_extras/__pycache__/nodes_post_processing.cpython-310.pyc +0 -0
  166. hordelib/_comfyui/comfy_extras/__pycache__/nodes_rebatch.cpython-310.pyc +0 -0
  167. hordelib/_comfyui/comfy_extras/__pycache__/nodes_sag.cpython-310.pyc +0 -0
  168. hordelib/_comfyui/comfy_extras/__pycache__/nodes_sdupscale.cpython-310.pyc +0 -0
  169. hordelib/_comfyui/comfy_extras/__pycache__/nodes_stable3d.cpython-310.pyc +0 -0
  170. hordelib/_comfyui/comfy_extras/__pycache__/nodes_stable_cascade.cpython-310.pyc +0 -0
  171. hordelib/_comfyui/comfy_extras/__pycache__/nodes_tomesd.cpython-310.pyc +0 -0
  172. hordelib/_comfyui/comfy_extras/__pycache__/nodes_upscale_model.cpython-310.pyc +0 -0
  173. hordelib/_comfyui/comfy_extras/__pycache__/nodes_video_model.cpython-310.pyc +0 -0
  174. hordelib/_comfyui/comfy_extras/chainner_models/__init__.py +0 -0
  175. hordelib/_comfyui/comfy_extras/chainner_models/__pycache__/__init__.cpython-310.pyc +0 -0
  176. hordelib/_comfyui/comfy_extras/chainner_models/__pycache__/model_loading.cpython-310.pyc +0 -0
  177. hordelib/_comfyui/comfy_extras/chainner_models/__pycache__/types.cpython-310.pyc +0 -0
  178. hordelib/_comfyui/comfy_extras/chainner_models/architecture/DAT.py +1182 -0
  179. hordelib/_comfyui/comfy_extras/chainner_models/architecture/HAT.py +1277 -0
  180. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-DAT +201 -0
  181. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-ESRGAN +201 -0
  182. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-HAT +21 -0
  183. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-RealESRGAN +29 -0
  184. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-SCUNet +201 -0
  185. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-SPSR +201 -0
  186. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-SwiftSRGAN +121 -0
  187. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-Swin2SR +201 -0
  188. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-SwinIR +201 -0
  189. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LICENSE-lama +201 -0
  190. hordelib/_comfyui/comfy_extras/chainner_models/architecture/LaMa.py +694 -0
  191. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/ChannelAttention.py +110 -0
  192. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/LICENSE +201 -0
  193. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/OSA.py +577 -0
  194. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/OSAG.py +60 -0
  195. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/OmniSR.py +143 -0
  196. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/__pycache__/OSA.cpython-310.pyc +0 -0
  197. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/__pycache__/OSAG.cpython-310.pyc +0 -0
  198. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/__pycache__/OmniSR.cpython-310.pyc +0 -0
  199. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/__pycache__/esa.cpython-310.pyc +0 -0
  200. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/__pycache__/layernorm.cpython-310.pyc +0 -0
  201. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/__pycache__/pixelshuffle.cpython-310.pyc +0 -0
  202. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/esa.py +294 -0
  203. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/layernorm.py +70 -0
  204. hordelib/_comfyui/comfy_extras/chainner_models/architecture/OmniSR/pixelshuffle.py +31 -0
  205. hordelib/_comfyui/comfy_extras/chainner_models/architecture/RRDB.py +296 -0
  206. hordelib/_comfyui/comfy_extras/chainner_models/architecture/SCUNet.py +455 -0
  207. hordelib/_comfyui/comfy_extras/chainner_models/architecture/SPSR.py +383 -0
  208. hordelib/_comfyui/comfy_extras/chainner_models/architecture/SRVGG.py +114 -0
  209. hordelib/_comfyui/comfy_extras/chainner_models/architecture/SwiftSRGAN.py +161 -0
  210. hordelib/_comfyui/comfy_extras/chainner_models/architecture/Swin2SR.py +1377 -0
  211. hordelib/_comfyui/comfy_extras/chainner_models/architecture/SwinIR.py +1224 -0
  212. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__init__.py +0 -0
  213. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/DAT.cpython-310.pyc +0 -0
  214. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/HAT.cpython-310.pyc +0 -0
  215. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/LaMa.cpython-310.pyc +0 -0
  216. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/RRDB.cpython-310.pyc +0 -0
  217. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/SCUNet.cpython-310.pyc +0 -0
  218. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/SPSR.cpython-310.pyc +0 -0
  219. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/SRVGG.cpython-310.pyc +0 -0
  220. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/SwiftSRGAN.cpython-310.pyc +0 -0
  221. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/Swin2SR.cpython-310.pyc +0 -0
  222. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/SwinIR.cpython-310.pyc +0 -0
  223. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/__init__.cpython-310.pyc +0 -0
  224. hordelib/_comfyui/comfy_extras/chainner_models/architecture/__pycache__/block.cpython-310.pyc +0 -0
  225. hordelib/_comfyui/comfy_extras/chainner_models/architecture/block.py +546 -0
  226. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/LICENSE-GFPGAN +351 -0
  227. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/LICENSE-RestoreFormer +351 -0
  228. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/LICENSE-codeformer +35 -0
  229. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/__pycache__/codeformer.cpython-310.pyc +0 -0
  230. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/__pycache__/gfpganv1_clean_arch.cpython-310.pyc +0 -0
  231. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/__pycache__/restoreformer_arch.cpython-310.pyc +0 -0
  232. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/__pycache__/stylegan2_clean_arch.cpython-310.pyc +0 -0
  233. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/arcface_arch.py +265 -0
  234. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/codeformer.py +790 -0
  235. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/fused_act.py +81 -0
  236. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/gfpgan_bilinear_arch.py +389 -0
  237. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/gfpganv1_arch.py +566 -0
  238. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/gfpganv1_clean_arch.py +370 -0
  239. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/restoreformer_arch.py +776 -0
  240. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/stylegan2_arch.py +865 -0
  241. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/stylegan2_bilinear_arch.py +709 -0
  242. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/stylegan2_clean_arch.py +453 -0
  243. hordelib/_comfyui/comfy_extras/chainner_models/architecture/face/upfirdn2d.py +194 -0
  244. hordelib/_comfyui/comfy_extras/chainner_models/architecture/timm/LICENSE +201 -0
  245. hordelib/_comfyui/comfy_extras/chainner_models/architecture/timm/__pycache__/drop.cpython-310.pyc +0 -0
  246. hordelib/_comfyui/comfy_extras/chainner_models/architecture/timm/__pycache__/helpers.cpython-310.pyc +0 -0
  247. hordelib/_comfyui/comfy_extras/chainner_models/architecture/timm/__pycache__/weight_init.cpython-310.pyc +0 -0
  248. hordelib/_comfyui/comfy_extras/chainner_models/architecture/timm/drop.py +223 -0
  249. hordelib/_comfyui/comfy_extras/chainner_models/architecture/timm/helpers.py +31 -0
  250. hordelib/_comfyui/comfy_extras/chainner_models/architecture/timm/weight_init.py +128 -0
  251. hordelib/_comfyui/comfy_extras/chainner_models/model_loading.py +99 -0
  252. hordelib/_comfyui/comfy_extras/chainner_models/types.py +69 -0
  253. hordelib/_comfyui/comfy_extras/nodes_align_your_steps.py +45 -0
  254. hordelib/_comfyui/comfy_extras/nodes_canny.py +30 -0
  255. hordelib/_comfyui/comfy_extras/nodes_clip_sdxl.py +56 -0
  256. hordelib/_comfyui/comfy_extras/nodes_compositing.py +202 -0
  257. hordelib/_comfyui/comfy_extras/nodes_cond.py +25 -0
  258. hordelib/_comfyui/comfy_extras/nodes_custom_sampler.py +612 -0
  259. hordelib/_comfyui/comfy_extras/nodes_differential_diffusion.py +42 -0
  260. hordelib/_comfyui/comfy_extras/nodes_freelunch.py +113 -0
  261. hordelib/_comfyui/comfy_extras/nodes_hypernetwork.py +120 -0
  262. hordelib/_comfyui/comfy_extras/nodes_hypertile.py +83 -0
  263. hordelib/_comfyui/comfy_extras/nodes_images.py +195 -0
  264. hordelib/_comfyui/comfy_extras/nodes_ip2p.py +45 -0
  265. hordelib/_comfyui/comfy_extras/nodes_latent.py +155 -0
  266. hordelib/_comfyui/comfy_extras/nodes_mask.py +382 -0
  267. hordelib/_comfyui/comfy_extras/nodes_model_advanced.py +217 -0
  268. hordelib/_comfyui/comfy_extras/nodes_model_downscale.py +53 -0
  269. hordelib/_comfyui/comfy_extras/nodes_model_merging.py +339 -0
  270. hordelib/_comfyui/comfy_extras/nodes_model_merging_model_specific.py +60 -0
  271. hordelib/_comfyui/comfy_extras/nodes_morphology.py +49 -0
  272. hordelib/_comfyui/comfy_extras/nodes_pag.py +56 -0
  273. hordelib/_comfyui/comfy_extras/nodes_perpneg.py +102 -0
  274. hordelib/_comfyui/comfy_extras/nodes_photomaker.py +187 -0
  275. hordelib/_comfyui/comfy_extras/nodes_post_processing.py +279 -0
  276. hordelib/_comfyui/comfy_extras/nodes_rebatch.py +138 -0
  277. hordelib/_comfyui/comfy_extras/nodes_sag.py +170 -0
  278. hordelib/_comfyui/comfy_extras/nodes_sdupscale.py +47 -0
  279. hordelib/_comfyui/comfy_extras/nodes_stable3d.py +143 -0
  280. hordelib/_comfyui/comfy_extras/nodes_stable_cascade.py +140 -0
  281. hordelib/_comfyui/comfy_extras/nodes_tomesd.py +177 -0
  282. hordelib/_comfyui/comfy_extras/nodes_upscale_model.py +71 -0
  283. hordelib/_comfyui/comfy_extras/nodes_video_model.py +134 -0
  284. hordelib/_comfyui/comfyui_screenshot.png +0 -0
  285. hordelib/_comfyui/cuda_malloc.py +90 -0
  286. hordelib/_comfyui/custom_nodes/__pycache__/websocket_image_save.cpython-310.pyc +0 -0
  287. hordelib/_comfyui/custom_nodes/example_node.py.example +118 -0
  288. hordelib/_comfyui/custom_nodes/websocket_image_save.py +45 -0
  289. hordelib/_comfyui/execution.py +835 -0
  290. hordelib/_comfyui/extra_model_paths.yaml +4 -0
  291. hordelib/_comfyui/extra_model_paths.yaml.example +42 -0
  292. hordelib/_comfyui/folder_paths.py +267 -0
  293. hordelib/_comfyui/input/example.png +0 -0
  294. hordelib/_comfyui/latent_preview.py +98 -0
  295. hordelib/_comfyui/main.py +258 -0
  296. hordelib/_comfyui/models/checkpoints/put_checkpoints_here +0 -0
  297. hordelib/_comfyui/models/clip/put_clip_or_text_encoder_models_here +0 -0
  298. hordelib/_comfyui/models/clip_vision/put_clip_vision_models_here +0 -0
  299. hordelib/_comfyui/models/configs/anything_v3.yaml +73 -0
  300. hordelib/_comfyui/models/configs/v1-inference.yaml +70 -0
  301. hordelib/_comfyui/models/configs/v1-inference_clip_skip_2.yaml +73 -0
  302. hordelib/_comfyui/models/configs/v1-inference_clip_skip_2_fp16.yaml +74 -0
  303. hordelib/_comfyui/models/configs/v1-inference_fp16.yaml +71 -0
  304. hordelib/_comfyui/models/configs/v1-inpainting-inference.yaml +71 -0
  305. hordelib/_comfyui/models/configs/v2-inference-v.yaml +68 -0
  306. hordelib/_comfyui/models/configs/v2-inference-v_fp32.yaml +68 -0
  307. hordelib/_comfyui/models/configs/v2-inference.yaml +67 -0
  308. hordelib/_comfyui/models/configs/v2-inference_fp32.yaml +67 -0
  309. hordelib/_comfyui/models/configs/v2-inpainting-inference.yaml +158 -0
  310. hordelib/_comfyui/models/controlnet/put_controlnets_and_t2i_here +0 -0
  311. hordelib/_comfyui/models/diffusers/put_diffusers_models_here +0 -0
  312. hordelib/_comfyui/models/embeddings/put_embeddings_or_textual_inversion_concepts_here +0 -0
  313. hordelib/_comfyui/models/gligen/put_gligen_models_here +0 -0
  314. hordelib/_comfyui/models/hypernetworks/put_hypernetworks_here +0 -0
  315. hordelib/_comfyui/models/loras/put_loras_here +0 -0
  316. hordelib/_comfyui/models/photomaker/put_photomaker_models_here +0 -0
  317. hordelib/_comfyui/models/style_models/put_t2i_style_model_here +0 -0
  318. hordelib/_comfyui/models/unet/put_unet_files_here +0 -0
  319. hordelib/_comfyui/models/upscale_models/put_esrgan_and_other_upscale_models_here +0 -0
  320. hordelib/_comfyui/models/vae/put_vae_here +0 -0
  321. hordelib/_comfyui/models/vae_approx/put_taesd_encoder_pth_and_taesd_decoder_pth_here +0 -0
  322. hordelib/_comfyui/new_updater.py +35 -0
  323. hordelib/_comfyui/node_helpers.py +10 -0
  324. hordelib/_comfyui/nodes.py +1965 -0
  325. hordelib/_comfyui/notebooks/comfyui_colab.ipynb +329 -0
  326. hordelib/_comfyui/output/_output_images_will_be_put_here +0 -0
  327. hordelib/_comfyui/pytest.ini +5 -0
  328. hordelib/_comfyui/requirements.txt +13 -0
  329. hordelib/_comfyui/script_examples/basic_api_example.py +120 -0
  330. hordelib/_comfyui/script_examples/websockets_api_example.py +164 -0
  331. hordelib/_comfyui/script_examples/websockets_api_example_ws_images.py +159 -0
  332. hordelib/_comfyui/server.py +646 -0
  333. hordelib/_comfyui/tests/README.md +29 -0
  334. hordelib/_comfyui/tests/__init__.py +0 -0
  335. hordelib/_comfyui/tests/compare/conftest.py +41 -0
  336. hordelib/_comfyui/tests/compare/test_quality.py +195 -0
  337. hordelib/_comfyui/tests/conftest.py +36 -0
  338. hordelib/_comfyui/tests/inference/__init__.py +0 -0
  339. hordelib/_comfyui/tests/inference/graphs/default_graph_sdxl1_0.json +144 -0
  340. hordelib/_comfyui/tests/inference/test_inference.py +239 -0
  341. hordelib/_comfyui/tests-ui/.gitignore +1 -0
  342. hordelib/_comfyui/tests-ui/afterSetup.js +9 -0
  343. hordelib/_comfyui/tests-ui/babel.config.json +4 -0
  344. hordelib/_comfyui/tests-ui/globalSetup.js +14 -0
  345. hordelib/_comfyui/tests-ui/jest.config.js +11 -0
  346. hordelib/_comfyui/tests-ui/package-lock.json +5586 -0
  347. hordelib/_comfyui/tests-ui/package.json +31 -0
  348. hordelib/_comfyui/tests-ui/setup.js +88 -0
  349. hordelib/_comfyui/tests-ui/tests/extensions.test.js +196 -0
  350. hordelib/_comfyui/tests-ui/tests/groupNode.test.js +1005 -0
  351. hordelib/_comfyui/tests-ui/tests/users.test.js +295 -0
  352. hordelib/_comfyui/tests-ui/tests/widgetInputs.test.js +557 -0
  353. hordelib/_comfyui/tests-ui/utils/ezgraph.js +452 -0
  354. hordelib/_comfyui/tests-ui/utils/index.js +129 -0
  355. hordelib/_comfyui/tests-ui/utils/litegraph.js +36 -0
  356. hordelib/_comfyui/tests-ui/utils/nopProxy.js +6 -0
  357. hordelib/_comfyui/tests-ui/utils/setup.js +81 -0
  358. hordelib/_comfyui/web/extensions/core/clipspace.js +166 -0
  359. hordelib/_comfyui/web/extensions/core/colorPalette.js +761 -0
  360. hordelib/_comfyui/web/extensions/core/contextMenuFilter.js +148 -0
  361. hordelib/_comfyui/web/extensions/core/dynamicPrompts.js +48 -0
  362. hordelib/_comfyui/web/extensions/core/editAttention.js +144 -0
  363. hordelib/_comfyui/web/extensions/core/groupNode.js +1281 -0
  364. hordelib/_comfyui/web/extensions/core/groupNodeManage.css +149 -0
  365. hordelib/_comfyui/web/extensions/core/groupNodeManage.js +422 -0
  366. hordelib/_comfyui/web/extensions/core/groupOptions.js +259 -0
  367. hordelib/_comfyui/web/extensions/core/invertMenuScrolling.js +36 -0
  368. hordelib/_comfyui/web/extensions/core/keybinds.js +70 -0
  369. hordelib/_comfyui/web/extensions/core/linkRenderMode.js +25 -0
  370. hordelib/_comfyui/web/extensions/core/maskeditor.js +923 -0
  371. hordelib/_comfyui/web/extensions/core/nodeTemplates.js +412 -0
  372. hordelib/_comfyui/web/extensions/core/noteNode.js +41 -0
  373. hordelib/_comfyui/web/extensions/core/rerouteNode.js +274 -0
  374. hordelib/_comfyui/web/extensions/core/saveImageExtraOutput.js +35 -0
  375. hordelib/_comfyui/web/extensions/core/simpleTouchSupport.js +102 -0
  376. hordelib/_comfyui/web/extensions/core/slotDefaults.js +91 -0
  377. hordelib/_comfyui/web/extensions/core/snapToGrid.js +89 -0
  378. hordelib/_comfyui/web/extensions/core/undoRedo.js +177 -0
  379. hordelib/_comfyui/web/extensions/core/uploadImage.js +12 -0
  380. hordelib/_comfyui/web/extensions/core/widgetInputs.js +800 -0
  381. hordelib/_comfyui/web/extensions/logging.js.example +55 -0
  382. hordelib/_comfyui/web/index.html +48 -0
  383. hordelib/_comfyui/web/jsconfig.json +10 -0
  384. hordelib/_comfyui/web/lib/litegraph.core.js +14424 -0
  385. hordelib/_comfyui/web/lib/litegraph.css +693 -0
  386. hordelib/_comfyui/web/lib/litegraph.extensions.js +21 -0
  387. hordelib/_comfyui/web/scripts/api.js +422 -0
  388. hordelib/_comfyui/web/scripts/app.js +2253 -0
  389. hordelib/_comfyui/web/scripts/defaultGraph.js +119 -0
  390. hordelib/_comfyui/web/scripts/domWidget.js +326 -0
  391. hordelib/_comfyui/web/scripts/logging.js +370 -0
  392. hordelib/_comfyui/web/scripts/pnginfo.js +433 -0
  393. hordelib/_comfyui/web/scripts/ui/dialog.js +32 -0
  394. hordelib/_comfyui/web/scripts/ui/draggableList.js +287 -0
  395. hordelib/_comfyui/web/scripts/ui/imagePreview.js +97 -0
  396. hordelib/_comfyui/web/scripts/ui/settings.js +317 -0
  397. hordelib/_comfyui/web/scripts/ui/spinner.css +34 -0
  398. hordelib/_comfyui/web/scripts/ui/spinner.js +9 -0
  399. hordelib/_comfyui/web/scripts/ui/toggleSwitch.js +60 -0
  400. hordelib/_comfyui/web/scripts/ui/userSelection.css +135 -0
  401. hordelib/_comfyui/web/scripts/ui/userSelection.js +114 -0
  402. hordelib/_comfyui/web/scripts/ui.js +642 -0
  403. hordelib/_comfyui/web/scripts/utils.js +88 -0
  404. hordelib/_comfyui/web/scripts/widgets.js +527 -0
  405. hordelib/_comfyui/web/style.css +559 -0
  406. hordelib/_comfyui/web/types/comfy.d.ts +76 -0
  407. hordelib/_comfyui/web/types/litegraph.d.ts +1506 -0
  408. hordelib/_comfyui/web/user.css +1 -0
  409. hordelib/_version.py +16 -0
  410. hordelib/benchmark.py +252 -0
  411. hordelib/comfy_horde.py +810 -0
  412. hordelib/config_path.py +27 -0
  413. hordelib/consts.py +85 -0
  414. hordelib/exceptions.py +10 -0
  415. hordelib/horde.py +1364 -0
  416. hordelib/initialisation.py +107 -0
  417. hordelib/install_comfy.py +166 -0
  418. hordelib/model_database/db_dep.json +98 -0
  419. hordelib/model_database/db_embeds.json +43 -0
  420. hordelib/model_database/diffusers.json +31 -0
  421. hordelib/model_database/med_config.json +21 -0
  422. hordelib/model_manager/__init__.py +3 -0
  423. hordelib/model_manager/base.py +756 -0
  424. hordelib/model_manager/codeformer.py +11 -0
  425. hordelib/model_manager/compvis.py +50 -0
  426. hordelib/model_manager/controlnet.py +56 -0
  427. hordelib/model_manager/diffusers.py +17 -0
  428. hordelib/model_manager/esrgan.py +15 -0
  429. hordelib/model_manager/gfpgan.py +15 -0
  430. hordelib/model_manager/hyper.py +354 -0
  431. hordelib/model_manager/lora.py +1244 -0
  432. hordelib/model_manager/safety_checker.py +15 -0
  433. hordelib/model_manager/ti.py +850 -0
  434. hordelib/nodes/__init__.py +3 -0
  435. hordelib/nodes/comfy_controlnet_preprocessors/.gitignore +4 -0
  436. hordelib/nodes/comfy_controlnet_preprocessors/LICENSE +201 -0
  437. hordelib/nodes/comfy_controlnet_preprocessors/README.md +91 -0
  438. hordelib/nodes/comfy_controlnet_preprocessors/__init__.py +364 -0
  439. hordelib/nodes/comfy_controlnet_preprocessors/binary/__init__.py +15 -0
  440. hordelib/nodes/comfy_controlnet_preprocessors/canny/__init__.py +6 -0
  441. hordelib/nodes/comfy_controlnet_preprocessors/color/__init__.py +20 -0
  442. hordelib/nodes/comfy_controlnet_preprocessors/hed/__init__.py +150 -0
  443. hordelib/nodes/comfy_controlnet_preprocessors/leres/__init__.py +122 -0
  444. hordelib/nodes/comfy_controlnet_preprocessors/leres/leres/LICENSE +23 -0
  445. hordelib/nodes/comfy_controlnet_preprocessors/leres/leres/Resnet.py +199 -0
  446. hordelib/nodes/comfy_controlnet_preprocessors/leres/leres/Resnext_torch.py +248 -0
  447. hordelib/nodes/comfy_controlnet_preprocessors/leres/leres/depthmap.py +550 -0
  448. hordelib/nodes/comfy_controlnet_preprocessors/leres/leres/multi_depth_model_woauxi.py +33 -0
  449. hordelib/nodes/comfy_controlnet_preprocessors/leres/leres/net_tools.py +51 -0
  450. hordelib/nodes/comfy_controlnet_preprocessors/leres/leres/network_auxi.py +416 -0
  451. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/LICENSE +19 -0
  452. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/models/__init__.py +67 -0
  453. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/models/base_model.py +244 -0
  454. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/models/base_model_hg.py +58 -0
  455. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/models/networks.py +623 -0
  456. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/models/pix2pix4depth_model.py +155 -0
  457. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/options/__init__.py +1 -0
  458. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/options/base_options.py +156 -0
  459. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/options/test_options.py +22 -0
  460. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/util/__init__.py +1 -0
  461. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/util/get_data.py +110 -0
  462. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/util/guidedfilter.py +47 -0
  463. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/util/html.py +86 -0
  464. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/util/image_pool.py +54 -0
  465. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/util/util.py +105 -0
  466. hordelib/nodes/comfy_controlnet_preprocessors/leres/pix2pix/util/visualizer.py +166 -0
  467. hordelib/nodes/comfy_controlnet_preprocessors/midas/__init__.py +39 -0
  468. hordelib/nodes/comfy_controlnet_preprocessors/midas/api.py +169 -0
  469. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/__init__.py +0 -0
  470. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/base_model.py +16 -0
  471. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/blocks.py +341 -0
  472. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/dpt_depth.py +108 -0
  473. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/midas_net.py +76 -0
  474. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/midas_net_custom.py +128 -0
  475. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/transforms.py +234 -0
  476. hordelib/nodes/comfy_controlnet_preprocessors/midas/midas/vit.py +491 -0
  477. hordelib/nodes/comfy_controlnet_preprocessors/midas/utils.py +189 -0
  478. hordelib/nodes/comfy_controlnet_preprocessors/mlsd/__init__.py +41 -0
  479. hordelib/nodes/comfy_controlnet_preprocessors/mlsd/models/mbv2_mlsd_large.py +292 -0
  480. hordelib/nodes/comfy_controlnet_preprocessors/mlsd/models/mbv2_mlsd_tiny.py +275 -0
  481. hordelib/nodes/comfy_controlnet_preprocessors/mlsd/utils.py +581 -0
  482. hordelib/nodes/comfy_controlnet_preprocessors/mp_face_mesh/__init__.py +156 -0
  483. hordelib/nodes/comfy_controlnet_preprocessors/mp_pose_hand/__init__.py +106 -0
  484. hordelib/nodes/comfy_controlnet_preprocessors/openpose/__init__.py +46 -0
  485. hordelib/nodes/comfy_controlnet_preprocessors/openpose/body.py +207 -0
  486. hordelib/nodes/comfy_controlnet_preprocessors/openpose/hand.py +71 -0
  487. hordelib/nodes/comfy_controlnet_preprocessors/openpose/model.py +217 -0
  488. hordelib/nodes/comfy_controlnet_preprocessors/openpose/util.py +164 -0
  489. hordelib/nodes/comfy_controlnet_preprocessors/pidinet/__init__.py +41 -0
  490. hordelib/nodes/comfy_controlnet_preprocessors/pidinet/model.py +638 -0
  491. hordelib/nodes/comfy_controlnet_preprocessors/requirements.txt +13 -0
  492. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/__init__.py +30 -0
  493. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/ade20k.py +54 -0
  494. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/chase_db1.py +59 -0
  495. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/cityscapes.py +54 -0
  496. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/cityscapes_769x769.py +35 -0
  497. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/drive.py +59 -0
  498. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/hrf.py +59 -0
  499. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/pascal_context.py +60 -0
  500. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/pascal_context_59.py +60 -0
  501. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/pascal_voc12.py +57 -0
  502. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/pascal_voc12_aug.py +9 -0
  503. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/datasets/stare.py +59 -0
  504. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/default_runtime.py +14 -0
  505. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/ann_r50-d8.py +46 -0
  506. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/apcnet_r50-d8.py +44 -0
  507. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/ccnet_r50-d8.py +44 -0
  508. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/cgnet.py +35 -0
  509. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/danet_r50-d8.py +44 -0
  510. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/deeplabv3_r50-d8.py +44 -0
  511. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/deeplabv3_unet_s5-d16.py +50 -0
  512. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/deeplabv3plus_r50-d8.py +46 -0
  513. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/dmnet_r50-d8.py +44 -0
  514. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/dnl_r50-d8.py +46 -0
  515. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/emanet_r50-d8.py +47 -0
  516. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/encnet_r50-d8.py +48 -0
  517. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/fast_scnn.py +57 -0
  518. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/fcn_hr18.py +52 -0
  519. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/fcn_r50-d8.py +45 -0
  520. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/fcn_unet_s5-d16.py +51 -0
  521. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/fpn_r50.py +36 -0
  522. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/fpn_uniformer.py +35 -0
  523. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/gcnet_r50-d8.py +46 -0
  524. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/lraspp_m-v3-d8.py +25 -0
  525. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/nonlocal_r50-d8.py +46 -0
  526. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/ocrnet_hr18.py +68 -0
  527. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/ocrnet_r50-d8.py +47 -0
  528. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/pointrend_r50.py +56 -0
  529. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/psanet_r50-d8.py +49 -0
  530. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/pspnet_r50-d8.py +44 -0
  531. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/pspnet_unet_s5-d16.py +50 -0
  532. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/upernet_r50.py +44 -0
  533. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/models/upernet_uniformer.py +43 -0
  534. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/schedules/schedule_160k.py +9 -0
  535. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/schedules/schedule_20k.py +9 -0
  536. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/schedules/schedule_40k.py +9 -0
  537. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/configs/_base_/schedules/schedule_80k.py +9 -0
  538. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/exp/upernet_global_small/config.py +38 -0
  539. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/exp/upernet_global_small/run.sh +10 -0
  540. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/exp/upernet_global_small/test.sh +10 -0
  541. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/exp/upernet_global_small/test_config_g.py +38 -0
  542. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/exp/upernet_global_small/test_config_h32.py +39 -0
  543. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/exp/upernet_global_small/test_config_w32.py +39 -0
  544. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/__init__.py +15 -0
  545. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/arraymisc/__init__.py +4 -0
  546. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/arraymisc/quantization.py +55 -0
  547. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/__init__.py +41 -0
  548. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/alexnet.py +61 -0
  549. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/__init__.py +35 -0
  550. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/activation.py +92 -0
  551. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/context_block.py +125 -0
  552. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/conv.py +44 -0
  553. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/conv2d_adaptive_padding.py +62 -0
  554. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/conv_module.py +206 -0
  555. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/conv_ws.py +148 -0
  556. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/depthwise_separable_conv_module.py +96 -0
  557. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/drop.py +64 -0
  558. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/generalized_attention.py +412 -0
  559. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/hsigmoid.py +34 -0
  560. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/hswish.py +29 -0
  561. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/non_local.py +306 -0
  562. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/norm.py +147 -0
  563. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/padding.py +36 -0
  564. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/plugin.py +88 -0
  565. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/registry.py +17 -0
  566. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/scale.py +21 -0
  567. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/swish.py +25 -0
  568. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/transformer.py +605 -0
  569. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/upsample.py +84 -0
  570. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/bricks/wrappers.py +180 -0
  571. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/builder.py +29 -0
  572. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/resnet.py +316 -0
  573. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/utils/__init__.py +19 -0
  574. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/utils/flops_counter.py +578 -0
  575. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/utils/fuse_conv_bn.py +59 -0
  576. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/utils/sync_bn.py +59 -0
  577. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/utils/weight_init.py +643 -0
  578. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/cnn/vgg.py +175 -0
  579. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/engine/__init__.py +8 -0
  580. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/engine/test.py +195 -0
  581. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/__init__.py +11 -0
  582. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/file_client.py +1127 -0
  583. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/handlers/__init__.py +7 -0
  584. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/handlers/base.py +30 -0
  585. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/handlers/json_handler.py +36 -0
  586. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/handlers/pickle_handler.py +28 -0
  587. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/handlers/yaml_handler.py +24 -0
  588. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/io.py +151 -0
  589. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/fileio/parse.py +97 -0
  590. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/image/__init__.py +28 -0
  591. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/image/colorspace.py +306 -0
  592. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/image/geometric.py +728 -0
  593. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/image/io.py +256 -0
  594. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/image/misc.py +43 -0
  595. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/image/photometric.py +428 -0
  596. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/model_zoo/deprecated.json +6 -0
  597. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/model_zoo/mmcls.json +31 -0
  598. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/model_zoo/open_mmlab.json +50 -0
  599. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/__init__.py +81 -0
  600. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/assign_score_withk.py +123 -0
  601. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/ball_query.py +55 -0
  602. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/bbox.py +72 -0
  603. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/border_align.py +109 -0
  604. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/box_iou_rotated.py +45 -0
  605. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/carafe.py +287 -0
  606. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/cc_attention.py +81 -0
  607. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/contour_expand.py +49 -0
  608. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/corner_pool.py +161 -0
  609. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/correlation.py +196 -0
  610. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/deform_conv.py +406 -0
  611. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/deform_roi_pool.py +204 -0
  612. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/deprecated_wrappers.py +43 -0
  613. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/focal_loss.py +212 -0
  614. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/furthest_point_sample.py +83 -0
  615. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/fused_bias_leakyrelu.py +268 -0
  616. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/gather_points.py +57 -0
  617. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/group_points.py +224 -0
  618. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/info.py +36 -0
  619. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/iou3d.py +85 -0
  620. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/knn.py +77 -0
  621. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/masked_conv.py +111 -0
  622. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/merge_cells.py +149 -0
  623. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/modulated_deform_conv.py +280 -0
  624. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/multi_scale_deform_attn.py +348 -0
  625. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/nms.py +383 -0
  626. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/pixel_group.py +75 -0
  627. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/point_sample.py +317 -0
  628. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/points_in_boxes.py +133 -0
  629. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/points_sampler.py +168 -0
  630. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/psa_mask.py +92 -0
  631. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/roi_align.py +223 -0
  632. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/roi_align_rotated.py +177 -0
  633. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/roi_pool.py +86 -0
  634. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/roiaware_pool3d.py +100 -0
  635. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/roipoint_pool3d.py +77 -0
  636. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/saconv.py +128 -0
  637. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/scatter_points.py +135 -0
  638. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/sync_bn.py +288 -0
  639. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/three_interpolate.py +68 -0
  640. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/three_nn.py +51 -0
  641. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/tin_shift.py +68 -0
  642. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/upfirdn2d.py +320 -0
  643. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/ops/voxelize.py +132 -0
  644. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/__init__.py +13 -0
  645. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/_functions.py +79 -0
  646. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/collate.py +84 -0
  647. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/data_container.py +89 -0
  648. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/data_parallel.py +89 -0
  649. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/distributed.py +105 -0
  650. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/distributed_deprecated.py +57 -0
  651. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/registry.py +9 -0
  652. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/scatter_gather.py +59 -0
  653. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/parallel/utils.py +20 -0
  654. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/__init__.py +47 -0
  655. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/base_module.py +194 -0
  656. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/base_runner.py +515 -0
  657. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/builder.py +22 -0
  658. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/checkpoint.py +670 -0
  659. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/default_constructor.py +43 -0
  660. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/dist_utils.py +164 -0
  661. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/epoch_based_runner.py +172 -0
  662. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/fp16_utils.py +388 -0
  663. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/__init__.py +29 -0
  664. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/checkpoint.py +156 -0
  665. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/closure.py +11 -0
  666. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/ema.py +89 -0
  667. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/evaluation.py +492 -0
  668. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/hook.py +101 -0
  669. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/iter_timer.py +18 -0
  670. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/__init__.py +15 -0
  671. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/base.py +166 -0
  672. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/dvclive.py +58 -0
  673. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/mlflow.py +78 -0
  674. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/neptune.py +82 -0
  675. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/pavi.py +113 -0
  676. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/tensorboard.py +49 -0
  677. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/text.py +235 -0
  678. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/logger/wandb.py +56 -0
  679. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/lr_updater.py +615 -0
  680. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/memory.py +25 -0
  681. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/momentum_updater.py +421 -0
  682. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/optimizer.py +457 -0
  683. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/profiler.py +180 -0
  684. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/sampler_seed.py +20 -0
  685. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/hooks/sync_buffer.py +22 -0
  686. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/iter_based_runner.py +256 -0
  687. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/log_buffer.py +41 -0
  688. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/optimizer/__init__.py +9 -0
  689. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/optimizer/builder.py +41 -0
  690. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/optimizer/default_constructor.py +245 -0
  691. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/priority.py +60 -0
  692. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/runner/utils.py +92 -0
  693. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/__init__.py +69 -0
  694. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/config.py +649 -0
  695. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/env.py +99 -0
  696. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/ext_loader.py +71 -0
  697. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/logging.py +110 -0
  698. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/misc.py +377 -0
  699. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/parrots_jit.py +41 -0
  700. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/parrots_wrapper.py +107 -0
  701. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/path.py +101 -0
  702. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/progressbar.py +208 -0
  703. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/registry.py +304 -0
  704. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/testing.py +140 -0
  705. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/timer.py +117 -0
  706. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/trace.py +24 -0
  707. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/utils/version_utils.py +90 -0
  708. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/version.py +35 -0
  709. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/video/__init__.py +11 -0
  710. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/video/io.py +310 -0
  711. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/video/optflow.py +248 -0
  712. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/video/processing.py +128 -0
  713. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/visualization/__init__.py +9 -0
  714. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/visualization/color.py +52 -0
  715. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/visualization/image.py +144 -0
  716. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv/visualization/optflow.py +109 -0
  717. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv_custom/__init__.py +5 -0
  718. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmcv_custom/checkpoint.py +477 -0
  719. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/apis/__init__.py +9 -0
  720. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/apis/inference.py +126 -0
  721. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/apis/test.py +216 -0
  722. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/apis/train.py +109 -0
  723. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/__init__.py +3 -0
  724. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/evaluation/__init__.py +8 -0
  725. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/evaluation/class_names.py +458 -0
  726. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/evaluation/eval_hooks.py +108 -0
  727. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/evaluation/metrics.py +296 -0
  728. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/seg/__init__.py +4 -0
  729. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/seg/builder.py +9 -0
  730. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/seg/sampler/__init__.py +4 -0
  731. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/seg/sampler/base_pixel_sampler.py +12 -0
  732. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/seg/sampler/ohem_pixel_sampler.py +76 -0
  733. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/utils/__init__.py +3 -0
  734. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/core/utils/misc.py +17 -0
  735. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/__init__.py +19 -0
  736. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/ade.py +84 -0
  737. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/builder.py +175 -0
  738. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/chase_db1.py +27 -0
  739. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/cityscapes.py +240 -0
  740. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/custom.py +372 -0
  741. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/dataset_wrappers.py +50 -0
  742. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/drive.py +27 -0
  743. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/hrf.py +27 -0
  744. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/pascal_context.py +103 -0
  745. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/pipelines/__init__.py +16 -0
  746. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/pipelines/compose.py +51 -0
  747. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/pipelines/formating.py +293 -0
  748. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/pipelines/loading.py +144 -0
  749. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/pipelines/test_time_aug.py +118 -0
  750. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/pipelines/transforms.py +838 -0
  751. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/stare.py +27 -0
  752. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/datasets/voc.py +29 -0
  753. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/__init__.py +12 -0
  754. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/__init__.py +17 -0
  755. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/cgnet.py +360 -0
  756. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/fast_scnn.py +353 -0
  757. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/hrnet.py +535 -0
  758. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/mobilenet_v2.py +182 -0
  759. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/mobilenet_v3.py +266 -0
  760. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/resnest.py +299 -0
  761. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/resnet.py +649 -0
  762. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/resnext.py +124 -0
  763. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/unet.py +450 -0
  764. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/uniformer.py +552 -0
  765. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/backbones/vit.py +442 -0
  766. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/builder.py +44 -0
  767. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/__init__.py +28 -0
  768. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/ann_head.py +259 -0
  769. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/apc_head.py +141 -0
  770. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/aspp_head.py +106 -0
  771. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/cascade_decode_head.py +57 -0
  772. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/cc_head.py +41 -0
  773. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/da_head.py +173 -0
  774. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/decode_head.py +226 -0
  775. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/dm_head.py +136 -0
  776. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/dnl_head.py +125 -0
  777. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/ema_head.py +155 -0
  778. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/enc_head.py +174 -0
  779. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/fcn_head.py +81 -0
  780. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/fpn_head.py +60 -0
  781. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/gc_head.py +41 -0
  782. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/lraspp_head.py +77 -0
  783. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/nl_head.py +46 -0
  784. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/ocr_head.py +124 -0
  785. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/point_head.py +312 -0
  786. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/psa_head.py +186 -0
  787. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/psp_head.py +101 -0
  788. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/sep_aspp_head.py +82 -0
  789. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/sep_fcn_head.py +54 -0
  790. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/decode_heads/uper_head.py +118 -0
  791. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/losses/__init__.py +12 -0
  792. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/losses/accuracy.py +78 -0
  793. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/losses/cross_entropy_loss.py +198 -0
  794. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/losses/dice_loss.py +119 -0
  795. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/losses/lovasz_loss.py +303 -0
  796. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/losses/utils.py +116 -0
  797. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/necks/__init__.py +4 -0
  798. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/necks/fpn.py +210 -0
  799. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/necks/multilevel_neck.py +53 -0
  800. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/segmentors/__init__.py +5 -0
  801. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/segmentors/base.py +255 -0
  802. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/segmentors/cascade_encoder_decoder.py +95 -0
  803. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/segmentors/encoder_decoder.py +275 -0
  804. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/__init__.py +13 -0
  805. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/drop.py +31 -0
  806. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/inverted_residual.py +217 -0
  807. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/make_divisible.py +27 -0
  808. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/res_layer.py +95 -0
  809. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/se_layer.py +60 -0
  810. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/self_attention_block.py +161 -0
  811. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/up_conv_block.py +106 -0
  812. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/models/utils/weight_init.py +62 -0
  813. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/ops/__init__.py +4 -0
  814. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/ops/encoding.py +74 -0
  815. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/ops/wrappers.py +50 -0
  816. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/utils/__init__.py +4 -0
  817. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/utils/collect_env.py +17 -0
  818. hordelib/nodes/comfy_controlnet_preprocessors/uniformer/mmseg/utils/logger.py +27 -0
  819. hordelib/nodes/comfy_controlnet_preprocessors/util.py +161 -0
  820. hordelib/nodes/facerestore/__init__.py +204 -0
  821. hordelib/nodes/facerestore/facelib/__init__.py +0 -0
  822. hordelib/nodes/facerestore/facelib/detection/__init__.py +116 -0
  823. hordelib/nodes/facerestore/facelib/detection/align_trans.py +219 -0
  824. hordelib/nodes/facerestore/facelib/detection/matlab_cp2tform.py +317 -0
  825. hordelib/nodes/facerestore/facelib/detection/retinaface/retinaface.py +420 -0
  826. hordelib/nodes/facerestore/facelib/detection/retinaface/retinaface_net.py +196 -0
  827. hordelib/nodes/facerestore/facelib/detection/retinaface/retinaface_utils.py +421 -0
  828. hordelib/nodes/facerestore/facelib/detection/yolov5face/__init__.py +0 -0
  829. hordelib/nodes/facerestore/facelib/detection/yolov5face/face_detector.py +175 -0
  830. hordelib/nodes/facerestore/facelib/detection/yolov5face/models/__init__.py +0 -0
  831. hordelib/nodes/facerestore/facelib/detection/yolov5face/models/common.py +324 -0
  832. hordelib/nodes/facerestore/facelib/detection/yolov5face/models/experimental.py +52 -0
  833. hordelib/nodes/facerestore/facelib/detection/yolov5face/models/yolo.py +300 -0
  834. hordelib/nodes/facerestore/facelib/detection/yolov5face/models/yolov5l.yaml +47 -0
  835. hordelib/nodes/facerestore/facelib/detection/yolov5face/models/yolov5n.yaml +45 -0
  836. hordelib/nodes/facerestore/facelib/detection/yolov5face/utils/__init__.py +0 -0
  837. hordelib/nodes/facerestore/facelib/detection/yolov5face/utils/autoanchor.py +12 -0
  838. hordelib/nodes/facerestore/facelib/detection/yolov5face/utils/datasets.py +35 -0
  839. hordelib/nodes/facerestore/facelib/detection/yolov5face/utils/extract_ckpt.py +5 -0
  840. hordelib/nodes/facerestore/facelib/detection/yolov5face/utils/general.py +271 -0
  841. hordelib/nodes/facerestore/facelib/detection/yolov5face/utils/torch_utils.py +40 -0
  842. hordelib/nodes/facerestore/facelib/parsing/__init__.py +28 -0
  843. hordelib/nodes/facerestore/facelib/parsing/bisenet.py +140 -0
  844. hordelib/nodes/facerestore/facelib/parsing/parsenet.py +194 -0
  845. hordelib/nodes/facerestore/facelib/parsing/resnet.py +69 -0
  846. hordelib/nodes/facerestore/facelib/utils/__init__.py +7 -0
  847. hordelib/nodes/facerestore/facelib/utils/face_restoration_helper.py +561 -0
  848. hordelib/nodes/facerestore/facelib/utils/face_utils.py +283 -0
  849. hordelib/nodes/facerestore/facelib/utils/misc.py +143 -0
  850. hordelib/nodes/node_controlnet_model_loader.py +35 -0
  851. hordelib/nodes/node_image_loader.py +42 -0
  852. hordelib/nodes/node_image_output.py +56 -0
  853. hordelib/nodes/node_lora_loader.py +73 -0
  854. hordelib/nodes/node_model_loader.py +147 -0
  855. hordelib/nodes/node_upscale_model_loader.py +29 -0
  856. hordelib/pipeline_designs/pipeline_controlnet.json +940 -0
  857. hordelib/pipeline_designs/pipeline_controlnet_annotator.json +537 -0
  858. hordelib/pipeline_designs/pipeline_controlnet_hires_fix.json +1085 -0
  859. hordelib/pipeline_designs/pipeline_image_facefix.json +177 -0
  860. hordelib/pipeline_designs/pipeline_image_upscale.json +173 -0
  861. hordelib/pipeline_designs/pipeline_stable_cascade.json +811 -0
  862. hordelib/pipeline_designs/pipeline_stable_cascade_remix.json +780 -0
  863. hordelib/pipeline_designs/pipeline_stable_diffusion.json +563 -0
  864. hordelib/pipeline_designs/pipeline_stable_diffusion_hires_fix.json +756 -0
  865. hordelib/pipeline_designs/pipeline_stable_diffusion_img2img_mask.json +625 -0
  866. hordelib/pipeline_designs/pipeline_stable_diffusion_paint.json +581 -0
  867. hordelib/pipelines/pipeline_controlnet.json +212 -0
  868. hordelib/pipelines/pipeline_controlnet_annotator.json +110 -0
  869. hordelib/pipelines/pipeline_controlnet_hires_fix.json +252 -0
  870. hordelib/pipelines/pipeline_image_facefix.json +39 -0
  871. hordelib/pipelines/pipeline_image_upscale.json +38 -0
  872. hordelib/pipelines/pipeline_stable_cascade.json +215 -0
  873. hordelib/pipelines/pipeline_stable_cascade_remix.json +207 -0
  874. hordelib/pipelines/pipeline_stable_diffusion.json +127 -0
  875. hordelib/pipelines/pipeline_stable_diffusion_hires_fix.json +167 -0
  876. hordelib/pipelines/pipeline_stable_diffusion_img2img_mask.json +140 -0
  877. hordelib/pipelines/pipeline_stable_diffusion_paint.json +132 -0
  878. hordelib/preload.py +53 -0
  879. hordelib/py.typed +0 -0
  880. hordelib/pyinstaller_hooks/__init__.py +0 -0
  881. hordelib/pyinstaller_hooks/hook-hordelib.horde.py +53 -0
  882. hordelib/safety.py +0 -0
  883. hordelib/safety_checker.py +18 -0
  884. hordelib/settings.py +149 -0
  885. hordelib/shared_model_manager.py +229 -0
  886. hordelib/train.py +384 -0
  887. hordelib/utils/__init__.py +0 -0
  888. hordelib/utils/distance.py +333 -0
  889. hordelib/utils/dynamicprompt.py +26 -0
  890. hordelib/utils/gpuinfo.py +199 -0
  891. hordelib/utils/image_utils.py +160 -0
  892. hordelib/utils/ioredirect.py +160 -0
  893. hordelib/utils/logger.py +167 -0
  894. hordelib/utils/sanitizer.py +38 -0
  895. hordelib/utils/switch.py +12 -0
@@ -0,0 +1,166 @@
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import numbers
3
+ from abc import ABCMeta, abstractmethod
4
+
5
+ import numpy as np
6
+ import torch
7
+
8
+ from ..hook import Hook
9
+
10
+
11
+ class LoggerHook(Hook):
12
+ """Base class for logger hooks.
13
+
14
+ Args:
15
+ interval (int): Logging interval (every k iterations).
16
+ ignore_last (bool): Ignore the log of last iterations in each epoch
17
+ if less than `interval`.
18
+ reset_flag (bool): Whether to clear the output buffer after logging.
19
+ by_epoch (bool): Whether EpochBasedRunner is used.
20
+ """
21
+
22
+ __metaclass__ = ABCMeta
23
+
24
+ def __init__(self,
25
+ interval=10,
26
+ ignore_last=True,
27
+ reset_flag=False,
28
+ by_epoch=True):
29
+ self.interval = interval
30
+ self.ignore_last = ignore_last
31
+ self.reset_flag = reset_flag
32
+ self.by_epoch = by_epoch
33
+
34
+ @abstractmethod
35
+ def log(self, runner):
36
+ pass
37
+
38
+ @staticmethod
39
+ def is_scalar(val, include_np=True, include_torch=True):
40
+ """Tell the input variable is a scalar or not.
41
+
42
+ Args:
43
+ val: Input variable.
44
+ include_np (bool): Whether include 0-d np.ndarray as a scalar.
45
+ include_torch (bool): Whether include 0-d torch.Tensor as a scalar.
46
+
47
+ Returns:
48
+ bool: True or False.
49
+ """
50
+ if isinstance(val, numbers.Number):
51
+ return True
52
+ elif include_np and isinstance(val, np.ndarray) and val.ndim == 0:
53
+ return True
54
+ elif include_torch and isinstance(val, torch.Tensor) and len(val) == 1:
55
+ return True
56
+ else:
57
+ return False
58
+
59
+ def get_mode(self, runner):
60
+ if runner.mode == 'train':
61
+ if 'time' in runner.log_buffer.output:
62
+ mode = 'train'
63
+ else:
64
+ mode = 'val'
65
+ elif runner.mode == 'val':
66
+ mode = 'val'
67
+ else:
68
+ raise ValueError(f"runner mode should be 'train' or 'val', "
69
+ f'but got {runner.mode}')
70
+ return mode
71
+
72
+ def get_epoch(self, runner):
73
+ if runner.mode == 'train':
74
+ epoch = runner.epoch + 1
75
+ elif runner.mode == 'val':
76
+ # normal val mode
77
+ # runner.epoch += 1 has been done before val workflow
78
+ epoch = runner.epoch
79
+ else:
80
+ raise ValueError(f"runner mode should be 'train' or 'val', "
81
+ f'but got {runner.mode}')
82
+ return epoch
83
+
84
+ def get_iter(self, runner, inner_iter=False):
85
+ """Get the current training iteration step."""
86
+ if self.by_epoch and inner_iter:
87
+ current_iter = runner.inner_iter + 1
88
+ else:
89
+ current_iter = runner.iter + 1
90
+ return current_iter
91
+
92
+ def get_lr_tags(self, runner):
93
+ tags = {}
94
+ lrs = runner.current_lr()
95
+ if isinstance(lrs, dict):
96
+ for name, value in lrs.items():
97
+ tags[f'learning_rate/{name}'] = value[0]
98
+ else:
99
+ tags['learning_rate'] = lrs[0]
100
+ return tags
101
+
102
+ def get_momentum_tags(self, runner):
103
+ tags = {}
104
+ momentums = runner.current_momentum()
105
+ if isinstance(momentums, dict):
106
+ for name, value in momentums.items():
107
+ tags[f'momentum/{name}'] = value[0]
108
+ else:
109
+ tags['momentum'] = momentums[0]
110
+ return tags
111
+
112
+ def get_loggable_tags(self,
113
+ runner,
114
+ allow_scalar=True,
115
+ allow_text=False,
116
+ add_mode=True,
117
+ tags_to_skip=('time', 'data_time')):
118
+ tags = {}
119
+ for var, val in runner.log_buffer.output.items():
120
+ if var in tags_to_skip:
121
+ continue
122
+ if self.is_scalar(val) and not allow_scalar:
123
+ continue
124
+ if isinstance(val, str) and not allow_text:
125
+ continue
126
+ if add_mode:
127
+ var = f'{self.get_mode(runner)}/{var}'
128
+ tags[var] = val
129
+ tags.update(self.get_lr_tags(runner))
130
+ tags.update(self.get_momentum_tags(runner))
131
+ return tags
132
+
133
+ def before_run(self, runner):
134
+ for hook in runner.hooks[::-1]:
135
+ if isinstance(hook, LoggerHook):
136
+ hook.reset_flag = True
137
+ break
138
+
139
+ def before_epoch(self, runner):
140
+ runner.log_buffer.clear() # clear logs of last epoch
141
+
142
+ def after_train_iter(self, runner):
143
+ if self.by_epoch and self.every_n_inner_iters(runner, self.interval):
144
+ runner.log_buffer.average(self.interval)
145
+ elif not self.by_epoch and self.every_n_iters(runner, self.interval):
146
+ runner.log_buffer.average(self.interval)
147
+ elif self.end_of_epoch(runner) and not self.ignore_last:
148
+ # not precise but more stable
149
+ runner.log_buffer.average(self.interval)
150
+
151
+ if runner.log_buffer.ready:
152
+ self.log(runner)
153
+ if self.reset_flag:
154
+ runner.log_buffer.clear_output()
155
+
156
+ def after_train_epoch(self, runner):
157
+ if runner.log_buffer.ready:
158
+ self.log(runner)
159
+ if self.reset_flag:
160
+ runner.log_buffer.clear_output()
161
+
162
+ def after_val_epoch(self, runner):
163
+ runner.log_buffer.average()
164
+ self.log(runner)
165
+ if self.reset_flag:
166
+ runner.log_buffer.clear_output()
@@ -0,0 +1,58 @@
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ from ...dist_utils import master_only
3
+ from ..hook import HOOKS
4
+ from .base import LoggerHook
5
+
6
+
7
+ @HOOKS.register_module()
8
+ class DvcliveLoggerHook(LoggerHook):
9
+ """Class to log metrics with dvclive.
10
+
11
+ It requires `dvclive`_ to be installed.
12
+
13
+ Args:
14
+ path (str): Directory where dvclive will write TSV log files.
15
+ interval (int): Logging interval (every k iterations).
16
+ Default 10.
17
+ ignore_last (bool): Ignore the log of last iterations in each epoch
18
+ if less than `interval`.
19
+ Default: True.
20
+ reset_flag (bool): Whether to clear the output buffer after logging.
21
+ Default: True.
22
+ by_epoch (bool): Whether EpochBasedRunner is used.
23
+ Default: True.
24
+
25
+ .. _dvclive:
26
+ https://dvc.org/doc/dvclive
27
+ """
28
+
29
+ def __init__(self,
30
+ path,
31
+ interval=10,
32
+ ignore_last=True,
33
+ reset_flag=True,
34
+ by_epoch=True):
35
+
36
+ super(DvcliveLoggerHook, self).__init__(interval, ignore_last,
37
+ reset_flag, by_epoch)
38
+ self.path = path
39
+ self.import_dvclive()
40
+
41
+ def import_dvclive(self):
42
+ try:
43
+ import dvclive
44
+ except ImportError:
45
+ raise ImportError(
46
+ 'Please run "pip install dvclive" to install dvclive')
47
+ self.dvclive = dvclive
48
+
49
+ @master_only
50
+ def before_run(self, runner):
51
+ self.dvclive.init(self.path)
52
+
53
+ @master_only
54
+ def log(self, runner):
55
+ tags = self.get_loggable_tags(runner)
56
+ if tags:
57
+ for k, v in tags.items():
58
+ self.dvclive.log(k, v, step=self.get_iter(runner))
@@ -0,0 +1,78 @@
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ from ...dist_utils import master_only
3
+ from ..hook import HOOKS
4
+ from .base import LoggerHook
5
+
6
+
7
+ @HOOKS.register_module()
8
+ class MlflowLoggerHook(LoggerHook):
9
+
10
+ def __init__(self,
11
+ exp_name=None,
12
+ tags=None,
13
+ log_model=True,
14
+ interval=10,
15
+ ignore_last=True,
16
+ reset_flag=False,
17
+ by_epoch=True):
18
+ """Class to log metrics and (optionally) a trained model to MLflow.
19
+
20
+ It requires `MLflow`_ to be installed.
21
+
22
+ Args:
23
+ exp_name (str, optional): Name of the experiment to be used.
24
+ Default None.
25
+ If not None, set the active experiment.
26
+ If experiment does not exist, an experiment with provided name
27
+ will be created.
28
+ tags (dict of str: str, optional): Tags for the current run.
29
+ Default None.
30
+ If not None, set tags for the current run.
31
+ log_model (bool, optional): Whether to log an MLflow artifact.
32
+ Default True.
33
+ If True, log runner.model as an MLflow artifact
34
+ for the current run.
35
+ interval (int): Logging interval (every k iterations).
36
+ ignore_last (bool): Ignore the log of last iterations in each epoch
37
+ if less than `interval`.
38
+ reset_flag (bool): Whether to clear the output buffer after logging
39
+ by_epoch (bool): Whether EpochBasedRunner is used.
40
+
41
+ .. _MLflow:
42
+ https://www.mlflow.org/docs/latest/index.html
43
+ """
44
+ super(MlflowLoggerHook, self).__init__(interval, ignore_last,
45
+ reset_flag, by_epoch)
46
+ self.import_mlflow()
47
+ self.exp_name = exp_name
48
+ self.tags = tags
49
+ self.log_model = log_model
50
+
51
+ def import_mlflow(self):
52
+ try:
53
+ import mlflow
54
+ import mlflow.pytorch as mlflow_pytorch
55
+ except ImportError:
56
+ raise ImportError(
57
+ 'Please run "pip install mlflow" to install mlflow')
58
+ self.mlflow = mlflow
59
+ self.mlflow_pytorch = mlflow_pytorch
60
+
61
+ @master_only
62
+ def before_run(self, runner):
63
+ super(MlflowLoggerHook, self).before_run(runner)
64
+ if self.exp_name is not None:
65
+ self.mlflow.set_experiment(self.exp_name)
66
+ if self.tags is not None:
67
+ self.mlflow.set_tags(self.tags)
68
+
69
+ @master_only
70
+ def log(self, runner):
71
+ tags = self.get_loggable_tags(runner)
72
+ if tags:
73
+ self.mlflow.log_metrics(tags, step=self.get_iter(runner))
74
+
75
+ @master_only
76
+ def after_run(self, runner):
77
+ if self.log_model:
78
+ self.mlflow_pytorch.log_model(runner.model, 'models')
@@ -0,0 +1,82 @@
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ from ...dist_utils import master_only
3
+ from ..hook import HOOKS
4
+ from .base import LoggerHook
5
+
6
+
7
+ @HOOKS.register_module()
8
+ class NeptuneLoggerHook(LoggerHook):
9
+ """Class to log metrics to NeptuneAI.
10
+
11
+ It requires `neptune-client` to be installed.
12
+
13
+ Args:
14
+ init_kwargs (dict): a dict contains the initialization keys as below:
15
+ - project (str): Name of a project in a form of
16
+ namespace/project_name. If None, the value of
17
+ NEPTUNE_PROJECT environment variable will be taken.
18
+ - api_token (str): User’s API token.
19
+ If None, the value of NEPTUNE_API_TOKEN environment
20
+ variable will be taken. Note: It is strongly recommended
21
+ to use NEPTUNE_API_TOKEN environment variable rather than
22
+ placing your API token in plain text in your source code.
23
+ - name (str, optional, default is 'Untitled'): Editable name of
24
+ the run. Name is displayed in the run's Details and in
25
+ Runs table as a column.
26
+ Check https://docs.neptune.ai/api-reference/neptune#init for
27
+ more init arguments.
28
+ interval (int): Logging interval (every k iterations).
29
+ ignore_last (bool): Ignore the log of last iterations in each epoch
30
+ if less than `interval`.
31
+ reset_flag (bool): Whether to clear the output buffer after logging
32
+ by_epoch (bool): Whether EpochBasedRunner is used.
33
+
34
+ .. _NeptuneAI:
35
+ https://docs.neptune.ai/you-should-know/logging-metadata
36
+ """
37
+
38
+ def __init__(self,
39
+ init_kwargs=None,
40
+ interval=10,
41
+ ignore_last=True,
42
+ reset_flag=True,
43
+ with_step=True,
44
+ by_epoch=True):
45
+
46
+ super(NeptuneLoggerHook, self).__init__(interval, ignore_last,
47
+ reset_flag, by_epoch)
48
+ self.import_neptune()
49
+ self.init_kwargs = init_kwargs
50
+ self.with_step = with_step
51
+
52
+ def import_neptune(self):
53
+ try:
54
+ import neptune.new as neptune
55
+ except ImportError:
56
+ raise ImportError(
57
+ 'Please run "pip install neptune-client" to install neptune')
58
+ self.neptune = neptune
59
+ self.run = None
60
+
61
+ @master_only
62
+ def before_run(self, runner):
63
+ if self.init_kwargs:
64
+ self.run = self.neptune.init(**self.init_kwargs)
65
+ else:
66
+ self.run = self.neptune.init()
67
+
68
+ @master_only
69
+ def log(self, runner):
70
+ tags = self.get_loggable_tags(runner)
71
+ if tags:
72
+ for tag_name, tag_value in tags.items():
73
+ if self.with_step:
74
+ self.run[tag_name].log(
75
+ tag_value, step=self.get_iter(runner))
76
+ else:
77
+ tags['global_step'] = self.get_iter(runner)
78
+ self.run[tag_name].log(tags)
79
+
80
+ @master_only
81
+ def after_run(self, runner):
82
+ self.run.stop()
@@ -0,0 +1,113 @@
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import json
3
+ import os
4
+ import os.path as osp
5
+
6
+ import torch
7
+ import yaml
8
+
9
+ import hordelib.nodes.comfy_controlnet_preprocessors.uniformer.mmcv as mmcv
10
+ from ....parallel.utils import is_module_wrapper
11
+ from ...dist_utils import master_only
12
+ from ..hook import HOOKS
13
+ from .base import LoggerHook
14
+
15
+
16
+ @HOOKS.register_module()
17
+ class PaviLoggerHook(LoggerHook):
18
+ def __init__(
19
+ self,
20
+ init_kwargs=None,
21
+ add_graph=False,
22
+ add_last_ckpt=False,
23
+ interval=10,
24
+ ignore_last=True,
25
+ reset_flag=False,
26
+ by_epoch=True,
27
+ img_key="img_info",
28
+ ):
29
+ super(PaviLoggerHook, self).__init__(interval, ignore_last, reset_flag, by_epoch)
30
+ self.init_kwargs = init_kwargs
31
+ self.add_graph = add_graph
32
+ self.add_last_ckpt = add_last_ckpt
33
+ self.img_key = img_key
34
+
35
+ @master_only
36
+ def before_run(self, runner):
37
+ super(PaviLoggerHook, self).before_run(runner)
38
+ try:
39
+ from pavi import SummaryWriter
40
+ except ImportError:
41
+ raise ImportError('Please run "pip install pavi" to install pavi.')
42
+
43
+ self.run_name = runner.work_dir.split("/")[-1]
44
+
45
+ if not self.init_kwargs:
46
+ self.init_kwargs = dict()
47
+ self.init_kwargs["name"] = self.run_name
48
+ self.init_kwargs["model"] = runner._model_name
49
+ if runner.meta is not None:
50
+ if "config_dict" in runner.meta:
51
+ config_dict = runner.meta["config_dict"]
52
+ assert isinstance(config_dict, dict), (
53
+ 'meta["config_dict"] has to be of a dict, ' f"but got {type(config_dict)}"
54
+ )
55
+ elif "config_file" in runner.meta:
56
+ config_file = runner.meta["config_file"]
57
+ config_dict = dict(mmcv.Config.fromfile(config_file))
58
+ else:
59
+ config_dict = None
60
+ if config_dict is not None:
61
+ # 'max_.*iter' is parsed in pavi sdk as the maximum iterations
62
+ # to properly set up the progress bar.
63
+ config_dict = config_dict.copy()
64
+ config_dict.setdefault("max_iter", runner.max_iters)
65
+ # non-serializable values are first converted in
66
+ # mmcv.dump to json
67
+ config_dict = json.loads(mmcv.dump(config_dict, file_format="json"))
68
+ session_text = yaml.dump(config_dict)
69
+ self.init_kwargs["session_text"] = session_text
70
+ self.writer = SummaryWriter(**self.init_kwargs)
71
+
72
+ def get_step(self, runner):
73
+ """Get the total training step/epoch."""
74
+ if self.get_mode(runner) == "val" and self.by_epoch:
75
+ return self.get_epoch(runner)
76
+ else:
77
+ return self.get_iter(runner)
78
+
79
+ @master_only
80
+ def log(self, runner):
81
+ tags = self.get_loggable_tags(runner, add_mode=False)
82
+ if tags:
83
+ self.writer.add_scalars(self.get_mode(runner), tags, self.get_step(runner))
84
+
85
+ @master_only
86
+ def after_run(self, runner):
87
+ if self.add_last_ckpt:
88
+ ckpt_path = osp.join(runner.work_dir, "latest.pth")
89
+ if osp.islink(ckpt_path):
90
+ ckpt_path = osp.join(runner.work_dir, os.readlink(ckpt_path))
91
+
92
+ if osp.isfile(ckpt_path):
93
+ # runner.epoch += 1 has been done before `after_run`.
94
+ iteration = runner.epoch if self.by_epoch else runner.iter
95
+ return self.writer.add_snapshot_file(
96
+ tag=self.run_name, snapshot_file_path=ckpt_path, iteration=iteration
97
+ )
98
+
99
+ # flush the buffer and send a task ending signal to Pavi
100
+ self.writer.close()
101
+
102
+ @master_only
103
+ def before_epoch(self, runner):
104
+ if runner.epoch == 0 and self.add_graph:
105
+ if is_module_wrapper(runner.model):
106
+ _model = runner.model.module
107
+ else:
108
+ _model = runner.model
109
+ device = next(_model.parameters()).device
110
+ data = next(iter(runner.data_loader))
111
+ image = data[self.img_key][0:1].to(device)
112
+ with torch.no_grad():
113
+ self.writer.add_graph(_model, image)
@@ -0,0 +1,49 @@
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import os.path as osp
3
+
4
+ from hordelib.nodes.comfy_controlnet_preprocessors.uniformer.mmcv.utils import TORCH_VERSION, digit_version
5
+ from ...dist_utils import master_only
6
+ from ..hook import HOOKS
7
+ from .base import LoggerHook
8
+
9
+
10
+ @HOOKS.register_module()
11
+ class TensorboardLoggerHook(LoggerHook):
12
+ def __init__(self, log_dir=None, interval=10, ignore_last=True, reset_flag=False, by_epoch=True):
13
+ super(TensorboardLoggerHook, self).__init__(interval, ignore_last, reset_flag, by_epoch)
14
+ self.log_dir = log_dir
15
+
16
+ @master_only
17
+ def before_run(self, runner):
18
+ super(TensorboardLoggerHook, self).before_run(runner)
19
+ if TORCH_VERSION == "parrots" or digit_version(TORCH_VERSION) < digit_version("1.1"):
20
+ try:
21
+ from tensorboardX import SummaryWriter
22
+ except ImportError:
23
+ raise ImportError("Please install tensorboardX to use " "TensorboardLoggerHook.")
24
+ else:
25
+ try:
26
+ from torch.utils.tensorboard import SummaryWriter
27
+ except ImportError:
28
+ raise ImportError(
29
+ 'Please run "pip install future tensorboard" to install '
30
+ "the dependencies to use torch.utils.tensorboard "
31
+ "(applicable to PyTorch 1.1 or higher)"
32
+ )
33
+
34
+ if self.log_dir is None:
35
+ self.log_dir = osp.join(runner.work_dir, "tf_logs")
36
+ self.writer = SummaryWriter(self.log_dir)
37
+
38
+ @master_only
39
+ def log(self, runner):
40
+ tags = self.get_loggable_tags(runner, allow_text=True)
41
+ for tag, val in tags.items():
42
+ if isinstance(val, str):
43
+ self.writer.add_text(tag, val, self.get_iter(runner))
44
+ else:
45
+ self.writer.add_scalar(tag, val, self.get_iter(runner))
46
+
47
+ @master_only
48
+ def after_run(self, runner):
49
+ self.writer.close()