vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.61k stars 411 forks source link

[Issue]: Unable to batch using img2img with and without control net #1248

Closed danaildichev closed 1 year ago

danaildichev commented 1 year ago

Issue Description

I am getting "Warning No result from function". Only one img2img is working fine, but it doesn't run as a batch operation with or without control net.

My server is starting up just fine:

Already up to date.
Using VENV: F:\Media\vlad1111\automatic\venv
11:41:38-184856 INFO     Running extension preloading
11:41:38-192637 INFO     Starting SD.Next
11:41:38-194127 INFO     Python 3.10.11 on Windows
11:41:38-221975 INFO     Version: 364df703 Thu Jun 1 11:43:28 2023 -0400
11:41:38-683636 INFO     Setting environment tuning
11:41:38-687108 INFO     nVidia CUDA toolkit detected
11:41:40-147807 INFO     Torch 2.0.0+cu118
11:41:40-173498 INFO     Torch backend: nVidia CUDA 11.8 cuDNN 8700
11:41:40-176229 INFO     Torch detected GPU: NVIDIA GeForce RTX 2070 SUPER VRAM 8192 Arch (7, 5) Cores 40
11:41:40-178710 INFO     Verifying requirements
11:41:40-195574 INFO     Installing packages
11:41:40-231447 INFO     No changes detected: Quick launch active
11:41:40-232440 INFO     Running extension preloading
11:41:40-233928 INFO     Server arguments: []
No module 'xformers'. Proceeding without it.
11:41:45-349510 INFO     Libraries loaded
11:41:45-353009 INFO     Using data path: F:\Media\vlad1111\automatic
11:41:45-355957 INFO     Available VAEs: F:\Media\vlad1111\automatic\models\VAE 2
11:41:45-392661 INFO     Available models: F:\Media\vlad1111\automatic\models\Stable-diffusion 23
ControlNet v1.1.208
ControlNet v1.1.208
11:41:48-225170 INFO     Loading UI theme: name=black-orange style=Auto
Create LRU cache (max_size=16) for preprocessor results.
Create LRU cache (max_size=16) for preprocessor results.
11:41:49-976412 INFO     Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16
Loading weights: F:\Media\vlad1111\automatic\models\Stable-diffusion\lyriel_v16.safetensors --------- 0.0/2.1   -:--:--
                                                                                                      GB
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
11:41:50-687313 INFO     Model created from config: F:\Media\vlad1111\automatic\configs\v1-inference.yaml
Loading weights: F:\Media\vlad1111\automatic\models\VAE\vae-ft-mse-840000-ema-pruned.ckpt ------ --- 210.6/334… 0:00:00
                                                                                                     MB
11:41:52-632127 INFO     Applying scaled dot product cross attention optimization
11:41:52-662414 INFO     Embeddings loaded: 9 ['advntr', 'atompunkstylesd15', 'bad-hands-5', 'badhandv4',
                         'centerfold512', 'easynegative', 'handmade2d', 'pinup512', 'prt']
11:41:52-671075 INFO     Model loaded in 2.7s (load=0.2s create=0.5s apply=0.4s vae=0.8s move=0.8s)
11:41:52-819874 INFO     Model load finished: {'ram': {'used': 3.17, 'total': 31.87}, 'gpu': {'used': 3.08, 'total':
                         8.0}, 'retries': 0, 'oom': 0}
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
11:41:53-136641 INFO     Local URL: http://127.0.0.1:7860/
11:41:53-138416 INFO     API Docs: http://127.0.0.1:7860/docs
11:41:53-139407 INFO     Initializing middleware
Create LRU cache (max_size=16) for preprocessor results.
11:41:53-521532 INFO     Startup time: 13.3s (torch=3.0s gradio=1.2s libraries=0.9s scripts=2.6s onchange=0.2s ui=4.7s
                         launch=0.2s scripts app_started_callback=0.1s checkpoint=0.3s)
11:46:33-665824 WARNING  No result returned from function

Version Platform Description

I am on the latest build as of the time that I am posting this bug report- it's the one that has control net v1.1.208 with the new inpainting update.

Version: 364df703 Thu Jun 1 11:43:28 2023 -0400

on Windows 10, 64 bit, with Python 3.10.11, running on Chrome 113.0.5672.127 (Official Build)

vladmandic commented 1 year ago

just made a quick change, can you update and try?

danaildichev commented 1 year ago

Awesome. Thank you so much. It's working on img2img. I will make time to try control net in just a bit.

Sorry about changing the title. I got confused between the img2img UI and the process img UI.

P.S. I'm trying to get the hang of using EbSynth. It seems to have some strong positives and strong negatives, but haven't really found a middle ground yet.

Trying to img2img a video's PNG sequence is a whole other ball game.

I haven't tried Deforum yet... there's so much to learn.

I made a 10 second video in Blender. Bro I've spent 2 days fiddling with it. This shit is nuts. I can't imagine how much more intense it must be maintaining your software.

danaildichev commented 1 year ago

Thank you!

vladmandic commented 1 year ago

btw, if you're doing videos, i suggest not to use anything built-in to actually generate video, just generate image sequence. and then use proper interpolator to generate more in-between frames for higher and smoother frame rate (for example, take a look at my quick implementation https://github.com/vladmandic/rife) and then just create video using ffmpeg.