GithubHelp home page GithubHelp logo

Comments (5)

fboulnois avatar fboulnois commented on May 17, 2024 1

Thank you for including the outputs, I think they eliminate two potential sources of randomness:

  • You're using the latest version of the CUDA driver, so version differences between drivers is likely not causing the issue
  • The pipeline is able to detect and run on the GPU, so final inference is likely not occurring on the CPU

The Huggingface model has a built-in safety checker: https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/safety_checker.py#L76

If you're familiar with Python debugging, I would check why the cosine distance difference is returning > 0 (which flags the image as nsfw).

from stable-diffusion-docker.

fboulnois avatar fboulnois commented on May 17, 2024

I am not able to reproduce this issue on my Windows box with the command you specified. My guess is there is some combination of hardware / software setup that is causing the issue.

If you run build.sh dev, it should drop you into a container. At the terminal, what is the output of these two commands?

nvidia-smi
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

from stable-diffusion-docker.

mayur7garg avatar mayur7garg commented on May 17, 2024

I use Docker Desktop on Windows 11 with WSL2 as backend.
I tried with even lower sizes as well but no change. I even tried directly running the container via PS instead of using the shell script but still no change.
Do note that the pipeline is always loaded as per the output. It also goes through all the 50 iterations and an output file is saved too. My GPU usage also reaches almost 100% while the pipeline is running. The output image just happens to be entirely black with the NSFW message in the container output.

I tried running the commands you said in the dev mode. I have attached the outputs and they are in line with what is expected.
nvidia.txt
tfgpu.txt

from stable-diffusion-docker.

mayur7garg avatar mayur7garg commented on May 17, 2024

Cool. I will try it over the weekend. Will also try creating a container and a pipeline script myself to see if I can get it working that way.

from stable-diffusion-docker.

fboulnois avatar fboulnois commented on May 17, 2024

I added a few options in the past two weeks, if you try the following does it work?

build.sh run --W 256 --H 256 --half --skip --attention-slicing --seed 42 --prompt 'magical castle'

--skip skips the safety checker altogether, and --attention-slicing decreases the amount of VRAM used.

from stable-diffusion-docker.

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.