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]: error: Your local changes to the following files would be overwritten by merge #2249

Closed ToniDuque closed 1 year ago

ToniDuque commented 1 year ago

Issue Description

I've had this error for two weeks and I can't update sdnext:

error: Your local changes to the following files would be overwritten by merge: webui.bat Please commit your changes or stash them before you merge. Aborting

Version Platform Description

No response

Relevant log output

remote: Enumerating objects: 79, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 79 (delta 44), reused 65 (delta 42), pack-reused 9
Unpacking objects: 100% (79/79), 111.91 KiB | 567.00 KiB/s, done.
From https://github.com/vladmandic/automatic
   4e7ad0e1..aabad688  dev        -> origin/dev
Fetching submodule extensions-builtin/sd-webui-controlnet
From https://github.com/Mikubill/sd-webui-controlnet
   e67e017..7a4805c  main       -> origin/main
Fetching submodule modules/lora
From https://github.com/kohya-ss/sd-scripts
   4c6f312..54500b8  main       -> origin/main
   948cf17..1e395ed  dev        -> origin/dev
 * [new branch]      dev2       -> origin/dev2
 * [new branch]      free-u     -> origin/free-u
   903825a..1e395ed  sdxl       -> origin/sdxl
Fetching submodule wiki
From https://github.com/vladmandic/automatic.wiki
   8a18252..9dc0327  master     -> origin/master
error: Your local changes to the following files would be overwritten by merge:
        webui.bat
Please commit your changes or stash them before you merge.
Aborting
Updating 25133420..89ba8e3c
Using VENV: C:\Users\Toni\Desktop\sdnext\automatic\venv
22:40:08-876039 INFO     Starting SD.Next
22:40:08-886316 INFO     Python 3.10.11 on Windows
22:40:08-992263 INFO     Version: app=sd.next updated=2023-09-14 hash=25133420
                         url=https://github.com/vladmandic/automatic.git/tree/master
22:40:09-376270 INFO     Latest published version: 89ba8e3cf6f4e7697ffe0298b49bed7ea108b039 2023-09-20T12:39:56Z
22:40:09-384185 INFO     Platform: arch=AMD64 cpu=AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD system=Windows
                         release=Windows-10-10.0.22621-SP0 python=3.10.11
22:40:09-384185 DEBUG    Setting environment tuning
22:40:09-389185 DEBUG    Torch overrides: cuda=False rocm=False ipex=False diml=False openvino=False
22:40:09-389185 DEBUG    Torch allowed: cuda=True rocm=True ipex=True diml=True openvino=True
22:40:09-389185 INFO     nVidia CUDA toolkit detected
22:40:09-496456 WARNING  Modified files: ['webui.bat']
22:40:09-596085 DEBUG    Repository update time: Thu Sep 14 14:51:35 2023
22:40:09-596085 DEBUG    Previous setup time: Fri Sep 22 23:58:21 2023
22:40:09-596085 INFO     Extensions: disabled=['a1111-sd-webui-lycoris', 'sd-dynamic-thresholding',
                         'multidiffusion-upscaler-for-automatic1111', 'sd-dynamic-prompts', 'sd-webui-llul',
                         'unprompted']
22:40:09-596085 INFO     Extensions: enabled=['clip-interrogator-ext', 'LDSR', 'Lora', 'ScuNET',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
                         extensions-builtin
22:40:09-606922 DEBUG    Latest extensions time: Fri Sep 22 23:57:27 2023
22:40:09-606922 DEBUG    Timestamps: version:1694695895 setup:1695419901 extension:1695419847
22:40:09-606922 INFO     No changes detected: Quick launch active
22:40:09-610926 INFO     Verifying requirements
22:40:09-636365 INFO     Verifying packages
22:40:09-636365 INFO     Extensions: disabled=['a1111-sd-webui-lycoris', 'sd-dynamic-thresholding',
                         'multidiffusion-upscaler-for-automatic1111', 'sd-dynamic-prompts', 'sd-webui-llul',
                         'unprompted']
22:40:09-636365 INFO     Extensions: enabled=['clip-interrogator-ext', 'LDSR', 'Lora', 'ScuNET',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
                         extensions-builtin
22:40:09-641267 INFO     Running in safe mode without user extensions
22:40:09-651271 INFO     Extension preload: {'extensions-builtin': 0.0}
22:40:09-651271 DEBUG    Starting module: <module 'webui' from 'C:\\Users\\Toni\\Desktop\\sdnext\\automatic\\webui.py'>
22:40:09-656773 INFO     Command line args: ['--backend', 'diffusers', '--debug', '--safe', '--autolaunch']
                         autolaunch=True backend=diffusers debug=True safe=True
22:40:24-249172 DEBUG    Loaded packages: torch=2.0.1+cu118 diffusers=0.20.2 gradio=3.43.2
22:40:25-196997 DEBUG    Reading: config.json len=27
22:40:25-196997 INFO     Engine: backend=Backend.DIFFUSERS compute=cuda mode=no_grad device=cuda
22:40:25-264233 INFO     Device: device=NVIDIA GeForce RTX 3060 n=1 arch=compute_37 cap=(8, 6) cuda=11.8 cudnn=8700
                         driver=531.79
22:40:26-334575 DEBUG    Entering start sequence
22:40:26-350312 DEBUG    Initializing
22:40:26-350312 INFO     Available VAEs: models\VAE items=1
22:40:26-350312 INFO     Diffusers disabling uncompatible extensions: ['sd-webui-controlnet']
22:40:26-350312 DEBUG    Scanning diffusers cache: models\Diffusers models\Diffusers items=0 time=0.00s
22:40:26-350312 DEBUG    Reading: cache.json len=2
22:40:26-381545 DEBUG    Reading: metadata.json len=189
22:40:26-397569 INFO     Available models: models\Stable-diffusion items=78 time=0.05s
22:40:26-524014 DEBUG    Loading extensions
22:40:30-215079 INFO     Extensions time: 3.68s { clip-interrogator-ext=1.21s Lora=0.19s sd-extension-system-info=0.08s
                         sd-webui-agent-scheduler=0.69s stable-diffusion-webui-images-browser=0.11s
                         stable-diffusion-webui-rembg=1.23s ScuNET=0.06s }
22:40:30-230706 DEBUG    Loaded upscalers: items=10
22:40:30-373466 INFO     Loading UI theme: name=black-teal style=Auto
22:40:30-389317 DEBUG    Loaded styles: folder=models\styles items=3
22:40:30-389317 DEBUG    Creating UI
22:40:30-405020 DEBUG    Reading: ui-config.json len=0
22:40:30-470583 DEBUG    Extra networks: page='checkpoints' items=78 subdirs=2 tab=txt2img
                         dirs=['models\\Stable-diffusion', 'models\\Diffusers',
                         'C:\\Users\\Toni\\Desktop\\sdnext\\automatic\\models\\Stable-diffusion'] time=0.02
22:40:30-470583 DEBUG    Extra networks: page='styles' items=3 subdirs=1 tab=txt2img dirs=['models\\styles'] time=0.0
22:40:30-470583 DEBUG    Extra networks: page='textual inversion' items=4 subdirs=1 tab=txt2img
                         dirs=['models\\embeddings'] time=0.0
22:40:30-484089 DEBUG    Extra networks: page='hypernetworks' items=0 subdirs=0 tab=txt2img
                         dirs=['models\\hypernetworks'] time=0.0
22:40:30-515396 DEBUG    Extra networks: page='lora' items=92 subdirs=1 tab=txt2img dirs=['models\\Lora'] time=0.03
22:40:30-656569 DEBUG    Reading: ui-config.json len=0
22:40:30-688003 INFO     Themes: builtin=6 default=5 external=54
22:40:35-311557 DEBUG    Script: 4.51s ui_tabs
                         C:\Users\Toni\Desktop\sdnext\automatic\extensions-builtin\stable-diffusion-webui-images-browser
                         \scripts\image_browser.py
22:40:35-327183 DEBUG    Extensions list failed to load: C:\Users\Toni\Desktop\sdnext\automatic\html\extensions.json
22:40:36-132603 DEBUG    Extension list refresh: processed=13 installed=13 enabled=9 disabled=4 visible=13 hidden=0
22:40:36-384720 INFO     Local URL: http://127.0.0.1:7860/
22:40:36-384720 DEBUG    Gradio registered functions: 1475
22:40:36-384720 INFO     Initializing middleware
22:40:36-384720 DEBUG    Creating API
22:40:36-557151 INFO     [AgentScheduler] Task queue is empty
22:40:36-557151 INFO     [AgentScheduler] Registering APIs
22:40:36-578185 DEBUG    Script: 0.13s app_started
                         C:\Users\Toni\Desktop\sdnext\automatic\extensions-builtin\sd-webui-agent-scheduler\scripts\task
                         _scheduler.py
22:40:36-652052 DEBUG    Scripts setup: ['X/Y/Z Grid:0.016s']
22:40:36-667669 DEBUG    Model metadata: metadata.json no changes
22:40:36-667669 DEBUG    Verifying Torch settings
22:40:36-793983 DEBUG    Desired Torch parameters: dtype=FP16 no-half=False no-half-vae=False upscast=False
22:40:36-793983 INFO     Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16
                         context=no_grad fp16=True bf16=False
22:40:36-793983 DEBUG    Torch default device: cuda
22:40:36-793983 DEBUG    Select checkpoint: model protovisionXLHighFidelity3D_beta0520Bakedvae.safetensors [0538f9319d]
22:40:36-793983 INFO     Loading diffuser model:
                         C:\Users\Toni\Desktop\sdnext\automatic\models\Stable-diffusion\protovisionXLHighFidelity3D_beta
                         0520Bakedvae.safetensors
22:40:36-793983 DEBUG    Model autodetect model:
                         C:\Users\Toni\Desktop\sdnext\automatic\models\Stable-diffusion\protovisionXLHighFidelity3D_beta
                         0520Bakedvae.safetensors pipeline=Stable Diffusion XL size=6.46 GB
22:41:17-127607 DEBUG    Model model: pipeline=StableDiffusionXLPipeline config={'low_cpu_mem_usage': True,
                         'torch_dtype': torch.float16, 'load_connected_pipeline': True, 'variant': 'fp16',
                         'local_files_only ': True, 'extract_ema': True, 'force_zeros_for_empty_prompt ': True,
                         'requires_aesthetics_score': False, 'config_files': {'v1': 'configs/v1-inference.yaml', 'v2':
                         'configs/v2-inference-768-v.yaml', 'xl': 'configs/sd_xl_base.yaml', 'xl_refiner':
                         'configs/sd_xl_refiner.yaml'}, 'use_safetensors': True}
22:41:17-142679 DEBUG    Model model VAE: name=None upcast=True
22:41:24-138439 INFO     Loaded embeddings: loaded=1 skipped=4
22:41:24-140813 INFO     Model loaded in 47.47s { load=47.47s } native=1024
22:41:24-527686 DEBUG    gc: collected=9760 device=cuda {'ram': {'used': 1.16, 'total': 43.89}, 'gpu': {'used': 7.81,
                         'total': 12.0}, 'retries': 0, 'oom': 0}
22:41:24-529689 INFO     Model load finished model: {'ram': {'used': 1.16, 'total': 43.89}, 'gpu': {'used': 7.81,
                         'total': 12.0}, 'retries': 0, 'oom': 0}
22:41:24-530689 DEBUG    Verifying Torch settings
22:41:24-533689 DEBUG    Desired Torch parameters: dtype=FP16 no-half=False no-half-vae=False upscast=False
22:41:24-534690 INFO     Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16
                         context=no_grad fp16=True bf16=False
22:41:24-535693 DEBUG    Torch default device: cuda
22:41:24-535693 DEBUG    Select checkpoint: refiner sd_xl_refiner_1.0.safetensors [7440042bbd]
22:41:24-536696 INFO     Loading diffuser refiner:
                         C:\Users\Toni\Desktop\sdnext\automatic\models\Stable-diffusion\sd_xl_refiner_1.0.safetensors
22:41:24-537700 DEBUG    Model autodetect refiner:
                         C:\Users\Toni\Desktop\sdnext\automatic\models\Stable-diffusion\sd_xl_refiner_1.0.safetensors
                         pipeline=Stable Diffusion XL size=5.66 GB
22:41:59-166338 DEBUG    Model refiner: pipeline=StableDiffusionXLImg2ImgPipeline config={'low_cpu_mem_usage': True,
                         'torch_dtype': torch.float16, 'load_connected_pipeline': True, 'variant': 'fp16',
                         'local_files_only ': True, 'extract_ema': True, 'force_zeros_for_empty_prompt ': True,
                         'requires_aesthetics_score': False, 'config_files': {'v1': 'configs/v1-inference.yaml', 'v2':
                         'configs/v2-inference-768-v.yaml', 'xl': 'configs/sd_xl_base.yaml', 'xl_refiner':
                         'configs/sd_xl_refiner.yaml'}, 'use_safetensors': True}
22:41:59-178389 DEBUG    Model refiner VAE: name=None upcast=True
22:41:59-263089 DEBUG    Moving refiner model to CPU
22:41:59-299542 INFO     Loaded embeddings: loaded=1 skipped=4
22:41:59-299542 INFO     Model loaded in 34.77s { load=34.77s } native=1024
22:41:59-660311 DEBUG    gc: collected=823 device=cuda {'ram': {'used': 6.84, 'total': 43.89}, 'gpu': {'used': 7.81,
                         'total': 12.0}, 'retries': 0, 'oom': 0}
22:41:59-662497 INFO     Model load finished refiner: {'ram': {'used': 6.84, 'total': 43.89}, 'gpu': {'used': 7.81,
                         'total': 12.0}, 'retries': 0, 'oom': 0}
22:41:59-664502 DEBUG    Saving: config.json len=1573
22:41:59-664502 INFO     Startup time: 109.99s { torch=12.08s gradio=0.96s diffusers=1.53s libraries=2.09s
                         extensions=3.68s codeformer=0.11s onchange=0.14s ui-txt2img=0.16s ui-settings=0.11s
                         ui-extensions=5.40s ui-defaults=0.06s launch=0.17s api=0.06s app-started=0.20s
                         checkpoint=83.01s }
22:41:59-668506 INFO     Launching browser

Backend

Diffusers

Model

SD-XL

Acknowledgements

vladmandic commented 1 year ago

well, it says it right there in the log - you've modified webui.bat which is NOT allowed. if you want to modify params, its covered in at least 10+ posts and in faq. you can do git stash to stash your local changes and allow upgrade to proceed, but your changes will be overwritten.

ToniDuque commented 1 year ago

yes, but I only modified it to add set COMMANDLINE_ARGS= --autolaunch git pull and I made this modification after installing sdnext more than a month ago. It's now when I get this error but before I didn't get it and it updated automatically without problems. In any case, will it be solved by doing git stash? and where do I have to do git stash? in the webui.bat itself? As for autolaunch and git pull, where do I put it if I'm not supposed to modify webui.bat?

edit: I didn't have the webui-user.bat file so I created it this way:

@echo off

REM set PYTHON= REM set GIT= REM set VENV_DIR= REM set COMMANDLINE_ARGS=--opt-sdp-no-mem-attention --no-half-vae --opt-channelslast --disable-nan-check REM set COMMANDLINE_ARGS=--xformers --no-half-vae --no-half --disable-nan-check set COMMANDLINE_ARGS=--autolaunch git stash git pull call webui.bat --backend diffusers --debug

It seems that it has now been updated but as of 20 September. Is this correct?

16:30:47-175929 INFO Starting SD.Next 16:30:47-175929 INFO Python 3.10.11 on Windows 16:30:47-270352 INFO Version: app=sd.next updated=2023-09-20 hash=89ba8e3c url=https://github.com/vladmandic/automatic.git/tree/master 16:30:47-696236 INFO Platform: arch=AMD64 cpu=AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD system=Windows release=Windows-10-10.0.22621-SP0 python=3.10.11 16:30:47-696236 DEBUG Setting environment tuning 16:30:47-696236 DEBUG Torch overrides: cuda=False rocm=False ipex=False diml=False openvino=False 16:30:47-696236 DEBUG Torch allowed: cuda=True rocm=True ipex=True diml=True openvino=True 16:30:47-696236 INFO nVidia CUDA toolkit detected 16:30:47-837425 DEBUG Repository update time: Wed Sep 20 14:39:56 2023 16:30:47-837425 DEBUG Previous setup time: Mon Sep 25 16:23:31 2023

vladmandic commented 1 year ago

that works, few comments:

ToniDuque commented 1 year ago

ok, thank you very much. One last question: Will there be controlnet for sdxl?

vladmandic commented 1 year ago

yes. its in progress. code is working, but existing extension is not compatible with it, so need to basically write front-end.