hartmark / sd-rocm

Docker Compose for Stable Diffusion ROCm
GNU Affero General Public License v3.0
4 stars 0 forks source link

FutureWarning: You are using `torch.load` with `weights_only=False` #2

Open grigio opened 1 week ago

grigio commented 1 week ago

Hi I get this error/warning

stable-diffusion-webui-1  | /sd-webui/modules_forge/patch_basic.py:38: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
$ docker compose up
[+] Running 1/0
 ✔ Container sd-rocm-stable-diffusion-webui-1  Cr...                                              0.0s 
Attaching to stable-diffusion-webui-1
stable-diffusion-webui-1  | GFX_NAME = gfx1036
stable-diffusion-webui-1  | Docker instance: webui
stable-diffusion-webui-1  | venv environment already initialized. Skipping initialization steps.
stable-diffusion-webui-1  | ====================
stable-diffusion-webui-1  | Already up to date.
stable-diffusion-webui-1  | Python 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:12:24) [GCC 11.2.0]
stable-diffusion-webui-1  | Version: f2.0.1v1.10.1-previous-530-g8bd7e056
stable-diffusion-webui-1  | Commit hash: 8bd7e0568f4d942f4d17bcc7a6966e92d2b897eb
stable-diffusion-webui-1  | Installing requirements
stable-diffusion-webui-1  | Legacy Preprocessor init warning: Unable to install insightface automatically. Please try run `pip install insightface` manually.
stable-diffusion-webui-1  | Launching Web UI with arguments: --skip-python-version-check --enable-insecure-extension-access --listen --port 81 --api --precision full --no-half
stable-diffusion-webui-1  | Total VRAM 512 MB, total RAM 47379 MB
stable-diffusion-webui-1  | pytorch version: 2.6.0.dev20240913+rocm6.2
stable-diffusion-webui-1  | Set vram state to: NORMAL_VRAM
stable-diffusion-webui-1  | Device: cuda:0 AMD Radeon Graphics : native
stable-diffusion-webui-1  | VAE dtype preferences: [torch.float32] -> torch.float32
stable-diffusion-webui-1  | CUDA Using Stream: False
stable-diffusion-webui-1  | Using sub quadratic optimization for cross attention
stable-diffusion-webui-1  | Using split attention for VAE
stable-diffusion-webui-1  | ControlNet preprocessor location: /sd-webui/models/ControlNetPreprocessor
stable-diffusion-webui-1  | 2024-09-14 11:17:47,987 - ControlNet - INFO - ControlNet UI callback registered.
stable-diffusion-webui-1  | Model selected: {'checkpoint_info': {'filename': '/sd-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors', 'hash': 'be9edd61'}, 'additional_modules': [], 'unet_storage_dtype': None}
stable-diffusion-webui-1  | Using online LoRAs in FP16: False
hartmark commented 1 week ago

Is it still able to generate a picture even with error there?

It looks like a obsolete warning so it won't affect anything now, but in the future when the deprecate the future.

I'm not so knowledgeable of webui forge but I found this issue you can track for progress.

https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/1697