SdPaint icon indicating copy to clipboard operation
SdPaint copied to clipboard

Added a key for eraser, read settings from json, and hr fix support

Open Danamir opened this issue 1 year ago • 6 comments

Great project ! I did some tests on my fork, mainly I added :

  • While 'e' is pressed, paint white (as I have a stylus without a middle button)
  • Read width & height from payload.json , supports sizes other than 512x512
  • Added guidance_start and guidance_end controlnet settings, and altered the values to give more leeway to the model
  • If hr is enabled in settings, automatically enlarges the canvas to support the rendered picture, the hr second pass steps are calculated dynamically a as steps * denoising
  • I added a .gitignore

My payload.json is adapted for those settings : 640x512, hr scale 1.25, hr upscaler Latent (bicubic) 0.6, DDIM 12 steps, guidance end 0.33, weight 0.6. Some of the new lines are needed by the altered code.

My modifications were not done carefully, so I'm not submitting a PR. But feel free to take inspiration from the modifications.

Updated content :

  • https://github.com/Danamir/SdPaint/blob/develop/Scripts/SdPaint.py
  • https://github.com/Danamir/SdPaint/blob/develop/payload.json

Cheers,

Danamir avatar Apr 17 '23 22:04 Danamir

My bad, the guidance start/end part must be wrong in my code, it has no effect.

Danamir avatar Apr 17 '23 23:04 Danamir

FYI I added some more features :

  • Use continuous line instead of dots when drawing
  • Interface size setting, with local upscale if necessary
  • Keyboard shortcuts for fullscreen, force render (otherwise you have to click one to send a late rendering)
  • Max FPS set to 240, and redraw only when necessary (the GPU was unnecessarily used)
  • Handle HTTP error codes

Danamir avatar Apr 18 '23 10:04 Danamir

Very nice! I don't have that much experience with github and don't know how to merge this with the main. I also added two extra features this morning

houseofsecrets avatar Apr 18 '23 11:04 houseofsecrets

If you want all of the updates I can simply create a PR from my branch (after a little cleanup). If you are interested only in some of the features tell me which ones and I'll create a specific branch and a PR.

Danamir avatar Apr 18 '23 11:04 Danamir

great, I'll take a look at it tomorrow

houseofsecrets avatar Apr 18 '23 11:04 houseofsecrets

FYI I added some more features :

  • Use continuous line instead of dots when drawing
  • Interface size setting, with local upscale if necessary
  • Keyboard shortcuts for fullscreen, force render (otherwise you have to click one to send a late rendering)
  • Max FPS set to 240, and redraw only when necessary (the GPU was unnecessarily used)
  • Handle HTTP error codes

can u help with my problem?

How to fix that error, I installed the models that I needed, but nothing has changed. raise RuntimeError(f"model not found: {model}") RuntimeError: model not found: None

sasuniki avatar Apr 18 '23 17:04 sasuniki