mcmonkeyprojects / sd-infinity-grid-generator-script

Infinite-Axis Grid Generator for Stable Diffusion!
MIT License
182 stars 25 forks source link

pyyaml-include #132

Closed Butterfly-Dragon closed 7 months ago

Butterfly-Dragon commented 7 months ago

i feel like something was mystyped 😅

*** Error loading script: infinity_grid.py
    Traceback (most recent call last):
      File "D:\Documents\GitHub\stable-diffusion-webui\modules\scripts.py", line 527, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\Documents\GitHub\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\Documents\GitHub\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\scripts\infinity_grid.py", line 22, in <module>
        import gridgencore as core
      File "D:\Documents\GitHub\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\gridgencore.py", line 7, in <module>
        from yamlinclude import YamlIncludeConstructor
    ModuleNotFoundError: No module named 'yamlinclude'

---
mcmonkey4eva commented 7 months ago

That code was working fine last I tested it -- it looks like @tanbro randomly changed the include path a few weeks ago https://github.com/tanbro/pyyaml-include/blob/main/CHANGELOG.md#20b1 ... which is a really odd thing to do to a published project.

mcmonkey4eva commented 7 months ago

Hard to test properly but the above commit changes the import to

try:
    from yamlinclude import YamlIncludeConstructor
except:
    from yaml_include import Constructor as YamlIncludeConstructor

Which is deeply cursed but might hopefully compensate for there now being two different classpaths for the same class spread among different users.

Butterfly-Dragon commented 7 months ago

thanks!

tanbro commented 7 months ago

Sorry for that pyyaml-include version 2.0 is too much different and not compatible to 1.0.

Also the namespace has changed to yaml_incliude.

If not want to change the project's source code, maybe we could just adjust the requirements as:

pyyaml-include>=1.4,<2.0
Butterfly-Dragon commented 7 months ago

i thought you closed this case because you made the adjustments. If the adjustments change the requirements for the extension i am fine with that.... but... like... uh... i cannot take such a decision on your code bevause i did not look into the code closely enough because i am already working 20 hours/day without compensation as i have been doing for the past 16 months thanks to living with greedy bastards and qorking in the family business. I just do not have the mental capacity or strength to look into this. I saw what looked like a silly honest mistake and wanted to warn you. Apologies if it causwd any stress. Please take care of yourself. And thanks again for your efforts.

mcmonkey4eva commented 7 months ago

tanbro is the developer of pyyaml-include, I mcmonkey4eva am the developer of infinite-grid-generator, we are two different people, lol

rafstahelin commented 5 months ago

Running auto1111 on Runpod--getting the above error.

Here are my specs:

version: [v1.9.4](https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/feee37d75f1b168768014e4634dcb156ee649c05)  •  python: 3.10.12  •  torch: 2.3.0+cu121  •  xformers: 0.0.26.post1  •  gradio: 3.41.2  •  checkpoint: [31e35c80fc](https://google.com/search?q=31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b)

Error Message on webui log:

** Error loading script: infinity_grid.py
    Traceback (most recent call last):
      File "/workspace/stable-diffusion-webui/extensions/sd-infinity-grid-generator-script/gridgencore.py", line 253, in <module>
        from yamlinclude import YamlIncludeConstructor
    ModuleNotFoundError: No module named 'yamlinclude'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/workspace/stable-diffusion-webui/modules/scripts.py", line 508, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/workspace/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/workspace/stable-diffusion-webui/extensions/sd-infinity-grid-generator-script/scripts/infinity_grid.py", line 22, in <module>
        import gridgencore as core
      File "/workspace/stable-diffusion-webui/extensions/sd-infinity-grid-generator-script/gridgencore.py", line 256, in <module>
        from yaml_include import Constructor
    ModuleNotFoundError: No module named 'yaml_include'

grid generator works fine on my local windows auto1111

Is there a fix for this linux setup?