Interal server error
Gigot-blip opened this issue · 13 comments
First thank you much to make such a program in Gimp !
we are a few to have the same problem : server denying connection or internal server error.
this is the message i get when i try to run "dream" in Gimp after having followed the instructions :
Traceback (most recent call last):
File "C:\Users\POP\AppData\Local\Programs\GIMP 2\lib\gimp\2.0\python/gimpfu.py", line 741, in response
dialog.res = run_script(params)
File "C:\Users\POP\AppData\Local\Programs\GIMP 2\lib\gimp\2.0\python/gimpfu.py", line 362, in run_script
return apply(function, params)
File "C:\Users\POP\AppData\Local\Programs\GIMP 2\lib\gimp\2.0\plug-ins\gimp-stable-diffusion.py", line 102, in img2img
raise ex
HTTPError: HTTP Error 500: Internal Server Error
In the tab "waiting for GIMP request" in Colab the error says : NameError: name 'model' is not defined
In the tab "select and load model", the model file is named sd-v1-4.ckpt, although in my drive it is named models.ckpt
Where does the problem could come from ?
Error 500 means, that an exception occurred on the server. Could you please post the error messages from the server?
Please rename the model file to „sd-v1-4.ckpt“ and execute the step „select and load model“ and the following steps again.
And please post next time a new message and don‘t update your old message. Otherwise it‘s pretty hard to follow the conversation
Thank you
I changed the name in my Drive to sd-v1-4.ckpt
i still get the same error
this is the message from the Colab server : Parameters sent from Gimp
inpainting: True, mask_brightness: 1.0, mask_contrast: 1.0, init_strength: 0.3, prompt_strength: 7.5, steps: 50, width: 512, height: 512, prompt: Michael Jackson wearing a golden this is it jacket, a magic castle in the background, seed: -1, api_version: 4
INFO:pytorch_lightning.utilities.seed:Global seed set to 3051337157
ERROR:main:Exception on /api/img2img [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/dist-packages/flask/compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "", line 201, in img2img
img = render_image_batch(args)[0]
File "", line 111, in render_image_batch
results = generate(args)
File "", line 298, in generate
sampler = PLMSSampler(model) if args.sampler == 'plms' else DDIMSampler(model)
NameError: name 'model' is not defined
INFO:werkzeug:127.0.0.1 - - [30/Sep/2022 15:21:31] "POST /api/img2img HTTP/1.1" 500 -
Parameters used for generating
namespace(C=4, H=512, W=512, batch_name='GIMP', ddim_eta=0.0, display_samples=False, dynamic_threshold=None, f=8, filename_format='{timestring}{index}_{prompt}.png', grid_rows=2, init_c=None, init_image='/content/drive/MyDrive/AI/StableDiffusion/init.png', init_latent=None, init_sample=None, invert_mask=False, make_grid=False, mask_brightness_adjust=1.0, mask_contrast_adjust=1.0, mask_file='/content/drive/MyDrive/AI/StableDiffusion/init.png', n_batch=1, n_samples=1, outdir='/content/drive/MyDrive/AI/StableDiffusion/2022-09/GIMP', precision='autocast', prompt='', sampler='klms', save_samples=False, save_settings=False, scale=7.5, seed=-1, static_threshold=None, steps=50, strength=0.0, strength_0_no_init=True, timestring='20220930151752', use_alpha_as_mask=False, use_init=True, use_mask=True)
Prompt 1 of 1
Michael Jackson wearing a golden this is it jacket, a magic castle in the background
Batch 1 of 1
Hm... It seems you have to start from the beginning again. Please choose "Disconnect and delete runtime" from the top menu "Runtime" and start again with connecting and executing all steps from top to bottom.
i restarted my computer, Gimp and Colab the way you said
i still have the exact same error i've copy paste in the previous message
the server link we have to copy paste to GIMP is the second link wich change name everytime, right ?
now that i remember that the "sd-v1-4.ckpt" file uploaded in my drive is a file i downloaded 2 or 3 weeks ago. (for a local implemetation but that didn't worked with my amd computer)
is it maybe too old ?
is there a way to update it without having to download another 4GB file that then take 12 hours to upload in the drive ?
I have modified the notebook now. It's now possible to check, if it's the right model file.
- Reopen the notebook from Github. It should show now v1.1.3 at top.
- Start runtime and execute the first steps as usual.
- At step "Select and load model" there is now the new checkbox "check_sha256". Check the checkbox and execute the step. The output should look like this at top:
...checking sha256
hash is correct
If you see "hash is correct", there is no need to upload a new file.
crap, i don't have hash is correct, i have : Using config: ./stable-diffusion/configs/stable-diffusion/v1-inference.yaml
Please download model checkpoint and place in /content/drive/MyDrive/SD/sd-v1-4/sd-v1-4.ckpt
do i really have to download a new file from huggingface, there is no way to update it from my drive ?
This is the directory where your model file is located? /content/drive/MyDrive/SD/sd-v1-4/
yes it is
I checked the code. The only reason the message you posted above is shown is, if the file doesn’t exist at the specified location. So please check again, if a file with this name exists in this directory:
/content/drive/MyDrive/SD/sd-v1-4/sd-v1-4.ckpt
ok sorry so weirdly enough, the model file and the folder of the same name are in the same "SD" folder, so i can delete the empty "sd-v1-4" folder i guess, or put the "sd-v1-4.ckpt" into the folder of the same name
the .ckpt file is sure here is taking a good chunk of my Drive
If you fixed the problem, you will see „...checking sha256“. If it‘s the right file „hash is correct“ is displayed. If the hash is wrong, you need to upload the file from huggingface linked in the readme.
ok, the problem is weird: everytime i run and it don't display "hash is correct", it is creating a new "sd-v1-4" folder and telling me my .ckpt file should be in it. Then when i run it again , it created another "sd-v1-4" folder inside the previous one next to the .ckpt file..
looks broken
i do think i need to download the recent from huggingface