Git Product home page Git Product logo

Comments (7)

Ainaemaet avatar Ainaemaet commented on August 22, 2024 2

Thank you @John-WL, that works well enough for now. :)

from sd-webui-comfyui.

John-WL avatar John-WL commented on August 22, 2024 1

One way to fix this is to execute this command before launching the webui:

ulimit -n 3000

It will increase the max amount of opened file descriptors to 3000. It's not the right way to fix the issue, but you can do this while we work on a better fix.

I think 3000 should be fine, but if it still doesn't work, you can try increasing the number even further.

from sd-webui-comfyui.

ljleb avatar ljleb commented on August 22, 2024

Please share the complete stack trace, not just a small section. Does the exact message repeats itself or it is a little bit different every time? For example are the numbers in </torch_1545_703365300_501> changing?

It seems related to the way the model is shared between processes, which we are working on rewriting ATM.

I found a way to make it so that we serialize unet call parameters and return value instead of the entire state dict, although it seems to be elaborate to implement AFAICT so I don't have an ETA.

from sd-webui-comfyui.

ljleb avatar ljleb commented on August 22, 2024

Does this help if you merge it locally?

https://github.com/ModelSurge/sd-webui-comfyui/pull/51/files

IIUC a quick fix might be to share one key at a time and garbage collect the shared memory after making a copy in the comfyui process. It shouldn't take more memory than we are already taking.

from sd-webui-comfyui.

ljleb avatar ljleb commented on August 22, 2024

Also we should consider not sharing the model if the webuiCheckpointLoader node isn't used.

To achieve this we can start the consumer thread and stop it when a node is added or removed from the node editor, or something like that.

from sd-webui-comfyui.

John-WL avatar John-WL commented on August 22, 2024

Please share the complete stack trace, not just a small section. Does the exact message repeats itself or it is a little bit different every time? For example are the numbers in </torch_1545_703365300_501> changing?

It seems related to the way the model is shared between processes, which we are working on rewriting ATM.

I found a way to make it so that we serialize unet call parameters and return value instead of the entire state dict, although it seems to be elaborate to implement AFAICT so I don't have an ETA.

I tested, I have the exact same error with wsl

Creating model from config: /home/plads/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying attention optimization: xformers... done.
Textual inversion embeddings loaded(0):
Model loaded in 5.7s (load weights from disk: 1.0s, create model: 0.5s, apply weights to model: 2.3s, apply half(): 0.7s, move model to device: 0.6s, scripts callbacks: 0.5s, calculate empty prompt: 0.1s).
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/queues.py", line 244, in _feed
  File "/usr/lib/python3.10/multiprocessing/reduction.py", line 51, in dumps
  File "/home/plads/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/multiprocessing/reductions.py", line 369, in reduce_storage
RuntimeError: unable to open shared memory object </torch_903_56158203_503> in read-write mode: Too many open files (24)

from sd-webui-comfyui.

ljleb avatar ljleb commented on August 22, 2024

@Ainaemaet as of the latest version of the extension, you shouldn't need the workaround anymore. Please let us know if anything does not work as intended.

from sd-webui-comfyui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.