nicknochnack / StableDiffusionApp

103 stars 83 forks source link

Not working #7

Open emadyounan opened 1 year ago

emadyounan commented 1 year ago

Didn't know the problem where, any help ????

pytorch

surya-4575 commented 1 year ago

NOT WORKINNG!!!!!!! CAN U RECTIFY?????????? Screenshot 2023-10-30 224941

anandvarrier commented 1 year ago

Hi, I am also getting few errors at my end. Yet to resolve.

However, @emadyounan and @surya-4575 just cross check if you have all the requirements installed properly. Manually install if necessary. If done then ignore.

Also @surya-4575, in you code try this line of code on your line 26.

pipe = StableDiffusionPipeline.from_pretrained(modelid, revision="fp16", torch_dtype=torch.float16, use_auth_token=auth_token, safety_checker=None, requires_safety_checker=False) I wrote the above line as I was getting this error: "Potential NSFW content was detected in one or more images. A black image will be returned instead. Try again with a different prompt and/or seed."

The above 2 additional parameters will help you to generate the correct image rather than a black image. For your reference:https://stackoverflow.com/questions/73828107/how-to-fix-nsfw-error-for-stable-diffusion

If anyone has this error, kindly help me as well. Error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\umesh\AppData\Local\Programs\Python\Python310\lib\tkinter__init.py", line 1921, in call return self.func(args) File "E:\Anand\Stable Diffusion\myenv\lib\site-packages\customtkinter\widgets\ctk_button.py", line 377, in clicked self.command() File "E:\Anand\Stable Diffusion\StableDiffusionApp\app.py", line 33, in generate image = pipe(prompt.get(), guidance_scale=8.5)["sample"][0] File "E:\Anand\Stable Diffusion\myenv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "E:\Anand\Stable Diffusion\myenv\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 271, in call__ image, has_nsfw_concept = self.safety_checker(images=image, clip_input=safety_cheker_input.pixel_values) File "E:\Anand\Stable Diffusion\myenv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "E:\Anand\Stable Diffusion\myenv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(args, **kwargs) TypeError: CLIPTextModel.forward() got an unexpected keyword argument 'images'

I AM ABLE TO RUN THE APPLICATION. THE WINDOW IS OPENING AND TAKING MY PROMPT. IT IS HOWEVER, NOT GENERATING ANYTHING.

S-Yugesh commented 10 months ago

@surya-4575 try this (pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html )

after create note book (testing_11.ipynb)

paste this code :

import torch
print(torch.cuda.is_available())

Run that notebook if it's print true you are done

now run main program(app.py)