Browsed by
Category: Problem solutions

Old versions of Long Dark

Old versions of Long Dark

The Long Dark was a great game I started playing during early access and really enjoyed. The lonely and desolate wilderness feel really worked well with the the struggle against very simple but brutal natural elements.

The game has been in development longer than some teenagers have even been alive – and has consequently changed a lot over that time. Kudos to Long Dark team for making a time capsule that lets you go back to those early drops by entering a release code in Steam.

While one should ALWAYS be cautious of trainers and save game editors (and there are some on the list that do have viruses (so it’s a good idea to scan them with a virus scanner and only run them in a virtual machine) here’s some of the older trainers for these early drops on GameCopyWorld.

Installing Black Forest Flux.1

Installing Black Forest Flux.1

Stable Diffusion really opened the world to what is possible with generative AI. Stable Diffusion 2 and 3 …well…did not go so well. For a while now, Stable Diffusion 1.5 was your best bet on locally generated AI art but it is really showing it’s age.

Now there is a new player in open source generative AI you can run locally. The developers from Stability.ai have founded Black Forest Labs and released their open source tool: Flux.1

While there are plenty of online generative AI’s like Midjourney, Adobe Firefly and others, they usually require paid or only give limited usage. What’s great about Flux.1 is that is allows completely local installation and usage.

Like many open source packages, there are free and paid versions. Their paid Pro version gives the most impressive results via their api (no purely local generation), a local dev version that can be used by developers but not for commercial use, and a free schnell version for personal use. Both the dev and shnell versions are available for local install and use.

So, lets get started with the shnell version – but the instructions are the same for dev except using 2 different model/weight files.

Instructions for installing Flux.1 on nVidia based Windows 10/11 system:

  1. Prerequisites:
    • Ensure you have python installed (I used 3.12.5)
    • Ensure you have pip installed (I used pip 24.2)
    • Ensure you have git installed and working
    • You might want to enable Windows Long Path support as python sometimes requires it for dependent packages. Be sure to reboot your system after enabling it.
    • Supported graphics card.
    • 32gb of system ram (though again, you can use the smaller model if you have less ram)
  2. Open a command prompt and make a local working root directory somewhere, I’ll use c:\depot\
  3. We’re going to follow the instructions on the ComfyUI git page.
    • Clone the ComfyUI project
C:\depot> git clone https://github.com/comfyanonymous/ComfyUI.git
  1. Install pytorch

Nvidia users should install stable pytorch using this command:

C:\depot> pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121

This is the command to install pytorch nightly instead which might have performance improvements:

C:\depot>pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu124
  1. Change directory into ComfyUI and ensure the requirements.txt file is there:
  1. Use pip to install all the ComfyUI requirements:
C:\depot\ComfyUI>pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: torch in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from -r requirements.txt (line 1)) (2.4.0+cu121)
Collecting torchsde (from -r requirements.txt (line 2))
Downloading torchsde-0.2.6-py3-none-any.whl.metadata (5.3 kB)
Requirement already satisfied: torchvision in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from -r requirements.txt (line 3)) (0.19.0+cu121)
Requirement already satisfied: torchaudio in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from -r requirements.txt (line 4)) (2.4.0+cu121)
Collecting einops (from -r requirements.txt (line 5))
Downloading einops-0.8.0-py3-none-any.whl.metadata (12 kB)
Collecting transformers>=4.28.1 (from -r requirements.txt (line 6))
Downloading transformers-4.44.0-py3-none-any.whl.metadata (43 kB)
Collecting tokenizers>=0.13.3 (from -r requirements.txt (line 7))
Downloading tokenizers-0.20.0-cp312-none-win_amd64.whl.metadata (6.9 kB)
Collecting sentencepiece (from -r requirements.txt (line 8))
Downloading sentencepiece-0.2.0-cp312-cp312-win_amd64.whl.metadata (8.3 kB)
Collecting safetensors>=0.4.2 (from -r requirements.txt (line 9))
Downloading safetensors-0.4.4-cp312-none-win_amd64.whl.metadata (3.9 kB)
Collecting aiohttp (from -r requirements.txt (line 10))
Downloading aiohttp-3.10.2-cp312-cp312-win_amd64.whl.metadata (7.8 kB)
Collecting pyyaml (from -r requirements.txt (line 11))
Downloading PyYAML-6.0.2-cp312-cp312-win_amd64.whl.metadata (2.1 kB)
Requirement already satisfied: Pillow in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from -r requirements.txt (line 12)) (10.4.0)
Collecting scipy (from -r requirements.txt (line 13))
Downloading scipy-1.14.0-cp312-cp312-win_amd64.whl.metadata (60 kB)
Collecting tqdm (from -r requirements.txt (line 14))
Downloading tqdm-4.66.5-py3-none-any.whl.metadata (57 kB)
Collecting psutil (from -r requirements.txt (line 15))
Downloading psutil-6.0.0-cp37-abi3-win_amd64.whl.metadata (22 kB)
Collecting kornia>=0.7.1 (from -r requirements.txt (line 18))
Downloading kornia-0.7.3-py2.py3-none-any.whl.metadata (7.7 kB)
Collecting spandrel (from -r requirements.txt (line 19))
Downloading spandrel-0.3.4-py3-none-any.whl.metadata (14 kB)
Collecting soundfile (from -r requirements.txt (line 20))
Downloading soundfile-0.12.1-py2.py3-none-win_amd64.whl.metadata (14 kB)
Requirement already satisfied: filelock in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torch->-r requirements.txt (line 1)) (3.15.4)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torch->-r requirements.txt (line 1)) (4.12.2)
Requirement already satisfied: sympy in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torch->-r requirements.txt (line 1)) (1.13.1)
Requirement already satisfied: networkx in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torch->-r requirements.txt (line 1)) (3.3)
Requirement already satisfied: jinja2 in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torch->-r requirements.txt (line 1)) (3.1.4)
Requirement already satisfied: fsspec in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torch->-r requirements.txt (line 1)) (2024.6.1)
Requirement already satisfied: setuptools in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torch->-r requirements.txt (line 1)) (72.1.0)
Requirement already satisfied: numpy>=1.19 in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from torchsde->-r requirements.txt (line 2)) (2.0.1)
Collecting trampoline>=0.1.2 (from torchsde->-r requirements.txt (line 2))
Downloading trampoline-0.1.2-py3-none-any.whl.metadata (10 kB)
Collecting huggingface-hub<1.0,>=0.23.2 (from transformers>=4.28.1->-r requirements.txt (line 6))
Downloading huggingface_hub-0.24.5-py3-none-any.whl.metadata (13 kB)
Collecting packaging>=20.0 (from transformers>=4.28.1->-r requirements.txt (line 6))
Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting regex!=2019.12.17 (from transformers>=4.28.1->-r requirements.txt (line 6))
Downloading regex-2024.7.24-cp312-cp312-win_amd64.whl.metadata (41 kB)
Collecting requests (from transformers>=4.28.1->-r requirements.txt (line 6))
Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting tokenizers>=0.13.3 (from -r requirements.txt (line 7))
Downloading tokenizers-0.19.1-cp312-none-win_amd64.whl.metadata (6.9 kB)
Collecting aiohappyeyeballs>=2.3.0 (from aiohttp->-r requirements.txt (line 10))
Downloading aiohappyeyeballs-2.3.5-py3-none-any.whl.metadata (5.8 kB)
Collecting aiosignal>=1.1.2 (from aiohttp->-r requirements.txt (line 10))
Downloading aiosignal-1.3.1-py3-none-any.whl.metadata (4.0 kB)
Collecting attrs>=17.3.0 (from aiohttp->-r requirements.txt (line 10))
Downloading attrs-24.2.0-py3-none-any.whl.metadata (11 kB)
Collecting frozenlist>=1.1.1 (from aiohttp->-r requirements.txt (line 10))
Downloading frozenlist-1.4.1-cp312-cp312-win_amd64.whl.metadata (12 kB)
Collecting multidict<7.0,>=4.5 (from aiohttp->-r requirements.txt (line 10))
Downloading multidict-6.0.5-cp312-cp312-win_amd64.whl.metadata (4.3 kB)
Collecting yarl<2.0,>=1.0 (from aiohttp->-r requirements.txt (line 10))
Downloading yarl-1.9.4-cp312-cp312-win_amd64.whl.metadata (32 kB)
Collecting colorama (from tqdm->-r requirements.txt (line 14))
Downloading colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting kornia-rs>=0.1.0 (from kornia>=0.7.1->-r requirements.txt (line 18))
Downloading kornia_rs-0.1.5-cp312-none-win_amd64.whl.metadata (8.9 kB)
Collecting cffi>=1.0 (from soundfile->-r requirements.txt (line 20))
Downloading cffi-1.17.0-cp312-cp312-win_amd64.whl.metadata (1.6 kB)
Collecting pycparser (from cffi>=1.0->soundfile->-r requirements.txt (line 20))
Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Collecting idna>=2.0 (from yarl<2.0,>=1.0->aiohttp->-r requirements.txt (line 10))
Downloading idna-3.7-py3-none-any.whl.metadata (9.9 kB)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from jinja2->torch->-r requirements.txt (line 1)) (2.1.5)
Collecting charset-normalizer<4,>=2 (from requests->transformers>=4.28.1->-r requirements.txt (line 6))
Downloading charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl.metadata (34 kB)
Collecting urllib3<3,>=1.21.1 (from requests->transformers>=4.28.1->-r requirements.txt (line 6))
Downloading urllib3-2.2.2-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests->transformers>=4.28.1->-r requirements.txt (line 6))
Downloading certifi-2024.7.4-py3-none-any.whl.metadata (2.2 kB)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\matt\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from sympy->torch->-r requirements.txt (line 1)) (1.3.0)
Downloading torchsde-0.2.6-py3-none-any.whl (61 kB)
Downloading einops-0.8.0-py3-none-any.whl (43 kB)
Downloading transformers-4.44.0-py3-none-any.whl (9.5 MB)
---------------------------------------- 9.5/9.5 MB ? eta 0:00:00
Downloading tokenizers-0.19.1-cp312-none-win_amd64.whl (2.2 MB)
---------------------------------------- 2.2/2.2 MB 3.9 MB/s eta 0:00:00
Downloading sentencepiece-0.2.0-cp312-cp312-win_amd64.whl (991 kB)
---------------------------------------- 992.0/992.0 kB 2.3 MB/s eta 0:00:00
Downloading safetensors-0.4.4-cp312-none-win_amd64.whl (286 kB)
Downloading aiohttp-3.10.2-cp312-cp312-win_amd64.whl (376 kB)
Downloading PyYAML-6.0.2-cp312-cp312-win_amd64.whl (156 kB)
Downloading scipy-1.14.0-cp312-cp312-win_amd64.whl (44.5 MB)
---------------------------------------- 44.5/44.5 MB 2.9 MB/s eta 0:00:00
Downloading tqdm-4.66.5-py3-none-any.whl (78 kB)
Downloading psutil-6.0.0-cp37-abi3-win_amd64.whl (257 kB)
Downloading kornia-0.7.3-py2.py3-none-any.whl (833 kB)
---------------------------------------- 833.3/833.3 kB 1.7 MB/s eta 0:00:00
Downloading spandrel-0.3.4-py3-none-any.whl (268 kB)
Downloading soundfile-0.12.1-py2.py3-none-win_amd64.whl (1.0 MB)
---------------------------------------- 1.0/1.0 MB 7.9 MB/s eta 0:00:00
Downloading aiohappyeyeballs-2.3.5-py3-none-any.whl (12 kB)
Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Downloading attrs-24.2.0-py3-none-any.whl (63 kB)
Downloading cffi-1.17.0-cp312-cp312-win_amd64.whl (181 kB)
Downloading frozenlist-1.4.1-cp312-cp312-win_amd64.whl (50 kB)
Downloading huggingface_hub-0.24.5-py3-none-any.whl (417 kB)
Downloading kornia_rs-0.1.5-cp312-none-win_amd64.whl (1.3 MB)
---------------------------------------- 1.3/1.3 MB 6.5 MB/s eta 0:00:00
Downloading multidict-6.0.5-cp312-cp312-win_amd64.whl (27 kB)
Downloading packaging-24.1-py3-none-any.whl (53 kB)
Downloading regex-2024.7.24-cp312-cp312-win_amd64.whl (269 kB)
Downloading trampoline-0.1.2-py3-none-any.whl (5.2 kB)
Downloading yarl-1.9.4-cp312-cp312-win_amd64.whl (76 kB)
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Downloading requests-2.32.3-py3-none-any.whl (64 kB)
Downloading certifi-2024.7.4-py3-none-any.whl (162 kB)
Downloading charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl (100 kB)
Downloading idna-3.7-py3-none-any.whl (66 kB)
Downloading urllib3-2.2.2-py3-none-any.whl (121 kB)
Downloading pycparser-2.22-py3-none-any.whl (117 kB)
Installing collected packages: trampoline, sentencepiece, urllib3, scipy, safetensors, regex, pyyaml, pycparser, psutil, packaging, multidict, kornia-rs, idna, frozenlist, einops, colorama, charset-normalizer, certifi, attrs, aiohappyeyeballs, yarl, tqdm, requests, cffi, aiosignal, torchsde, soundfile, kornia, huggingface-hub, aiohttp, tokenizers, spandrel, transformers
WARNING: The script normalizer.exe is installed in 'C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script tqdm.exe is installed in 'C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script huggingface-cli.exe is installed in 'C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\transformers\models\deprecated\trajectory_transformer\convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.py'
HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths

c:\depot\ComfyUI>
  1. Download and install the model data files in the correct folders

After you have ComfyUI downloaded, you need to get the model files and put them in the right places. Model files are found here and are downloaded and put inside the proper comfyUI\models\ subfolders.

You have a few options. First, you need to pick if you’re using the non-commercial Dev version or Schnell version. After that, each has the option of a single easy to use checkpoint package file, or each of the model data files individually. I’ll be using the Schnell ones, but you just need to get the Dev ones from the Dev branch if you want those instead.

If you’re running out of memory, you can replace the \clip\t5xxl_fp16.safetensors with t5xxl_fp8_e4m3fn.safetensors located here.

Schnell checkpoint file:

FileDownload linkCopy location
flux1-dev-fp8.safetensorshttps://huggingface.co/Comfy-Org/flux1-dev/blob/main/flux1-dev-fp8.safetensorsComfyUI\models\checkpoints

Schnell individual files:

FileDownload linkCopy location
t5xxl_fp16.safetensors https://huggingface.co/comfyanonymous/flux_text_encoders/tree/mainComfyUI\models\clip\
ae.safetensors https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/ae.safetensorsComfyUI\models\vae\
flux1-schnell.safetensorshttps://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/flux1-schnell.safetensorsComfyUI\models\unet\
  1. Start up the engine by running python on main.py
C:\depot\ComfyUI>python main.py

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "C:\depot\ComfyUI\main.py", line 83, in <module>
    import comfy.utils
  File "C:\depot\ComfyUI\comfy\utils.py", line 20, in <module>
    import torch
  File "C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\__init__.py", line 2120, in <module>
    from torch._higher_order_ops import cond
  File "C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\_higher_order_ops\__init__.py", line 1, in <module>
    from .cond import cond
  File "C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\_higher_order_ops\cond.py", line 5, in <module>
    import torch._subclasses.functional_tensor
  File "C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\_subclasses\functional_tensor.py", line 42, in <module>
    class FunctionalTensor(torch.Tensor):
  File "C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\_subclasses\functional_tensor.py", line 258, in FunctionalTensor
    cpu = _conversion_method_template(device=torch.device("cpu"))
C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\_subclasses\functional_tensor.py:258: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.)
  cpu = _conversion_method_template(device=torch.device("cpu"))
Total VRAM 24576 MB, total RAM 32492 MB
pytorch version: 2.4.0+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
Using pytorch cross attention
C:\depot\ComfyUI\comfy\extra_samplers\uni_pc.py:19: SyntaxWarning: invalid escape sequence '\h'
  """Create a wrapper class for the forward SDE (VP type).
****** User settings have been changed to be stored on the server instead of browser storage. ******
****** For multi-user setups add the --multi-user CLI argument to enable multiple user profiles. ******
[Prompt Server] web root: C:\depot\ComfyUI\web
C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\kornia\feature\lightglue.py:44: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)

Import times for custom nodes:
   0.0 seconds: C:\depot\ComfyUI\custom_nodes\websocket_image_save.py

Starting server

To see the GUI go to: http://127.0.0.1:8188
  1. Open your web browser and go to http://127.0.01:8188
  1. Click on the ‘Queue Prompt’ button to execute the current prompt

Technically it queues up the work and you should see progress in the command window where you launched python main.py

got prompt
model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
model_type FLOW
Using pytorch attention in VAE
Using pytorch attention in VAE
Model doesn't have a device attribute.
C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
  warnings.warn(
Model doesn't have a device attribute.
loaded straight to GPU
Requested to load Flux
Loading 1 new model
Requested to load FluxClipModel_
Loading 1 new model
C:\depot\ComfyUI\comfy\ldm\modules\attention.py:407: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:555.)
  out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False)
100%|████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:04<00:00,  1.18s/it]
Requested to load AutoencodingEngine
Loading 1 new model
Prompt executed in 23.65 seconds
  1. When it completes you should see your image. You can then save your image or tweak the parameters.

Debugging help:

  1. numpy is not available

My first runs, I got this from the console when I queued up a request:

got prompt
model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
model_type FLOW
Using pytorch attention in VAE
Using pytorch attention in VAE
Model doesn't have a device attribute.
C:\Users\matt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
  warnings.warn(
Model doesn't have a device attribute.
loaded straight to GPU
Requested to load Flux
Loading 1 new model
Requested to load FluxClipModel_
Loading 1 new model
C:\depot\ComfyUI\comfy\ldm\modules\attention.py:407: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:555.)
  out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False)
100%|████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:04<00:00,  1.19s/it]
Requested to load AutoencodingEngine
Loading 1 new model
!!! Exception during processing!!! Numpy is not available
Traceback (most recent call last):
  File "C:\depot\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\depot\ComfyUI\execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\depot\ComfyUI\execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\depot\ComfyUI\nodes.py", line 1445, in save_images
    i = 255. * image.cpu().numpy()
               ^^^^^^^^^^^^^^^^^^^
RuntimeError: Numpy is not available

Prompt executed in 26.44 seconds

It turns out that I, and others, have the wrong version of numpy. This fixed it by exiting out of the server (ctrl-c) and then installing numpy verison 1.26.4:

C:\depot\ComfyUI>pip install numpy==1.26.4
Defaulting to user installation because normal site-packages is not writeable
Collecting numpy==1.26.4
  Downloading numpy-1.26.4-cp312-cp312-win_amd64.whl.metadata (61 kB)
Downloading numpy-1.26.4-cp312-cp312-win_amd64.whl (15.5 MB)
   ---------------------------------------- 15.5/15.5 MB 57.4 MB/s eta 0:00:00
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 2.0.1
    Uninstalling numpy-2.0.1:
      Successfully uninstalled numpy-2.0.1
Successfully installed numpy-1.26.4

C:\depot\ComfyUI>

Uninstalling all pip/python package, clear your pip cache, then re-install the requirements

The first time I installed, I got an error when downloading the numpy library during step in which you pip install the requirements. In order to clear the pip cache, uninstall all pip packages, then re-install all requirements again, I did the following:

C:\depot\ComfyUI> pip uninstall -r requirements.txt -y 
C:\depot\ComfyUI> python -m pip cache purge

Then I re-ran all the pip installation commands.

Links:

Other generative AI installation guides:

I have previous posted instructions on how to install Stable Diffusion 2 (as well as Stable Diffusion 1.5 and 1.4) as well as some other package installs.

Attaching a ST-225 hard drive

Attaching a ST-225 hard drive

Here’s a collection of all the tools you’ll need to set up an old MFM style hard drive in a XT/286/386/486 computer.

Hardware you’ll need:

Software

Informational links:

Blue-screen Windows on purpose

Blue-screen Windows on purpose

I wrote awhile back on how to crash Linux/cause a Linux kernel panic in order to test how your program can handle a crash – but can you cause a Windows blue-screen programmatically?

Raymond Chen of the New Old Thing describes a variety of methods to crash Windows purposefully. He also cautions against ad-hoc methods like killing winlogin.

Methods you can use to cause a Windows Blue-screen:

  1. Windows allows you to configure a specific keyboard combination to cause a crash. You set some registry keys and then can crash a system by holding right CTRL then pressing scroll lock key twice. You can also customize the key sequence via registering custom keyboard scan codes. If you have a kernel debugger attached it will trigger the kernel debugger after the crash dump is written.
  2. The best way to trigger an artificial kernel crash is to use NotMyFault, which is part of the Microsoft Windows SysInternals tools.
Oculus Quest 2 issues from sitting too long

Oculus Quest 2 issues from sitting too long

Oculus is doing a black Friday sale for 2023. I have an Oculus Quest 2, but hadn’t used it in over a year. I plugged it in to charge it back up and browse the store. Unfortunately, the store app screen told me it couldn’t load the store.

I went to setting->Wifi and manually connected to my home network. Duh! (so I thought) Even after this, the store app was blank and would tell me it couldn’t display anything. Time to start debugging.

  • The wifi would connect and said it had excellent wifi signal, but limited connectivity.
    • I tested my other wireless devices and they had no trouble connecting to the wifi and could browse the net normally.
    • I unplugged the mesh network repeaters around my house in case it was picking up a weak signal from one of those. No change.
    • I tried setting up my iPhone with as a wireless hotspot and connected to that. I got the same strong signal, but limited connectivity.
    • I checked the IP address of my Oculus in Settings, and I could ping the device just fine. If I turned the headset off, I couldn’t ping it. It seemed like it was connected ok.
    • I tried unplugging other devices from my wifi in case there was an IP conflict anywhere. Same problem.
  • I tried connecting the quest with a USB cable but I still could not get updates nor see anything in the store app or main menu.
  • Despite not being used for 2 years, when I went to system->updates, it showed no updates available. Something is fishy, there had to be updates.
  • I opened the in-headset browser and it would tell me that I could not browse because the date was wrong. It was set to 5:00am Sept 17, 2037. Whoa.
    • There is NO way to change the date/time in the settings or anywhere else I could find.

It turns out, others have seen this issue too. Their Oculus fast forwards to the future mysteriously and then connectivity to the store/web/updates doesn’t seem to work after that. You need to get the date fixed, but there’s no obvious way to do it.

Solution: Factory Reset

In the end, I decided to do a factory reset (Hold the power and volume buttons while booting) because it had been well over a year since I used it last and I figured it would be good to have a clean start. However, there is the option of using side-loaded apps (see below).

Unfortunately, even the factory reset gave me a few headaches. First, the headset isn’t always obvious when it sleeps vs actually powers off. My first attempt I didn’t power off all the way and just woke from sleep and I didn’t get the reset menu holding the power+volume buttons down. I went to settings menu and shut the device down in the headset to be sure.

After that, I was then able to cold boot and get into the factory reset menu. I selected factory reset and waited for it to clean the device and the progress bar indicated the reset was complete. The screen went black (but still powered), but didn’t reboot. I let it set a few minutes, then decided to manually reboot with the power button. Fingers crossed.

The first reboot I got the meta logo, but shortly after that the screen went blank (still powered) but no reboot. I let it set for a few minutes then manually powered it off using the power button – again.

On the second reboot, I got the meta logo, and then it started animating. That’s a good sign. Then the welcome page came up and I could connect to wifi and start updating.

During the update phase (1/2) while the progress bar was moving, I took the headset off to read more instructions. When I put it back on to see how far it was, the display was a patterned garbled static. I took it off and let it sit for a minute, then tried again. The display came back up and the update phase 1 of 2 completed normally.

Sidequest

The bad part about a factory reset is you lose all your installed games. I had to go back in and start installing all of them again. What a pain, because it wasn’t a very fast process.

Another option is to load an app that will update your time via an alternate Oculus app store called Sidequest. Sidequest allows you to load your own apps – including an ‘Open Settings’ app that allows you to update your date/time.

ADB

The Oculus is really just an Android device underneath. This means if you have developer mode enabled and have the Android developer kit installed, you can use ADB commands. I haven’t tried this, but supposedly this will work:

adb shell am start -a android.settings.SETTINGS

If you have Sidequest loaded, you can use this:

adb shell am start -a android.intent.action.VIEW -d com.oculus.tv -e uri com.android.settings/.DevelopmentSettings com.oculus.vrshell/.MainActivity

Links:

My heads are gone!

My heads are gone!

Are you losing the heads of those images you’re generating in stable diffusion?

Try adding these keywords to your prompt:

  • “A view of”
  • “A scene of”
  • “Viewed from a distance”
  • “Standing on a “
  • “longshot”, “full shot”, “wideshot”, “extreme wide shot”, “full body”
  • start the prompt with “Head, face, eyes”
  • Try adjusting the aspect ratio of the image to be taller instead of wider. Be careful not to go too tall (or two wide) or you’ll get the double-head or start generating combinations of two people.
  • The source material has been scanned in a taller aspect ratio, try adjusting the x-side of your ratio
  • Use img2img on a crop that includes part of the chest to make it match the rest of the drawing
  • Cinematography terms tend to work well. In order of close to far: Extreme close-up, close-up, medium close-up, medium shot, medium full shot, full shot, long shot, extreme long shot.

Links:

Stable diffusion high quality prompt thought process

Stable diffusion high quality prompt thought process

Content warning: Some of the links have some moderately NSFW pictures. There is no outright nudity, but it does deal with generating rather busty images. This article should be fine, but be aware following the links.

While this guide is translated from a Japanese source and uses the Waifu/Danbooru model to generate more anime-looking models, it works really well for generating ultra-realistic Victorian pictures using stable diffusion’s standard 1.5 model. Here’s some I made using his prompt with just 30 minutes of experimenting:

Fair warning, the original author is trying to generate more…busty women that look better as anime characters under the Waifu model. I won’t comment on his original purpose, but I thought this was an interesting description of how a ‘prompt engineer’ moved from an idea to generating a stable diffusion prompt.

First he started with a good description of what he wanted:

I want a VICTORIAN GIRL in a style of OIL PAINTING
Eye and Face are important in art so she must have PERFECT FACESEXY FACE and her eye have DETAILED PUPILS
I want she to have LARGE BREASTTONED ABS and THICK THIGH.
She must look FEMININE doing EVOCATIVE POSESMIRK and FULL BODY wearing NIGHT GOWN
The output must be INTRICATEHIGH DETAILSHARP
And in the style of {I’m not give out the artist names to avoid trouble. Apologize.}

This lead him to generate the following prompt. Note his use of parenthesize () to add emphasis, and terms inside square brackets [] to minimize the direction.

Prompt :
VICTORIAN GIRL,FEMININE,((PERFECT FACE)),((SEXY FACE)),((DETAILED PUPILS)).(ARTIST),ARTIST,ARTIST,(ARTIST). OIL PAINTING. (((LARGE BREAST)),((TONED ABS)),(THICK THIGH).EVOCATIVE POSE, SMIRK,LOOK AT VIEWER, ((BLOUSE)).(INTRICATE),(HIGH DETAIL),SHARP

Unfortunately, you don’t need to experiment for long to realize stable diffusion needs a lot of help with anatomy. It often generates nightmare fuel images that that have multiple heads, messed up arms, hands with too many fingers, eyes with terrifying pupils (or no pupils), too many limbs – well, you get the idea. So you need to make sure those things don’t show up by banning them via setting the negative prompts (again, not commenting on original purpose):

Negative Prompt :
((nipple)), ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), (((tranny))), (((trans))), (((transsexual))), (hermaphrodite), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))). (((more than 2 nipples))). [[[adult]]], out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck)))

Finally, he made these settings to the stable diffusion settings. Note you want to keep the aspect ratio in a portrait-like format (768 tall x 512 wide). Going taller can result in multiple heads, going wider can result in more than one person in the scene.

Restore Face: ON
Steps: 42
Sampler: DDIM
CFG scale: 10
Height: 768
Width: 512

Links:

Expanding and enhancing Stable Diffusion with specialized models

Expanding and enhancing Stable Diffusion with specialized models

Now that you have Stable Diffusion 1.5 installed on your local system, have learned how to make cool generative prompts, it might be time to take the next step of trying different latent models.

There is more than one model out there for stable diffusion, and they can generate vastly different images:

Check out this article to learn how to install and use different popular models you can use with stable diffusion:

  • F222 – People found it useful in generating beautiful female portraits with correct body part relations. It’s quite good at generating aesthetically pleasing clothing.
  • Anything V3 – a special-purpose model trained to produce high-quality anime-style images. You can use danbooru tags (like 1girl, white hair) in text prompt.
  • Open Journey – a model fine-tuned with images generated by Mid Journey v4.
  • DreamShaper – model is fine-tuned for portrait illustration style that sits between photorealistic and computer graphics
  • Waifu-diffusion – Japanese anime style
  • Arcane Diffusion – TV show Arcane style
  • Robo Diffusion – Interesting robot style model that will turn everything your subject into robot
  • Mo-di-diffusion – Generate Pixar-like style models
  • Inkpunk Diffusion – Generate images in a unique illustration style
Better stable diffusion and AI generated art prompts

Better stable diffusion and AI generated art prompts

Now that you have stable diffusion on your system, how do you start taking advantage of it?

One way is to try some sample prompts to start with. Techspot has some good ones (halfway through the article) to whet your appetite.

You can get inspiration by looking at good examples on free public prompt marketplaces.

Then you might want to learn how to fix some common problems.

When you’re really ready to dive in, this article from Metaverse gives you a list of excellent getting started guides to help get you from beginner to proficient in generating your own awesome art.

The key to it all is learning the syntax, parameters, and art of crafting AI prompts. It’s as much art as it is science. It’s complex enough that there are everything from beginner examples, free guides, tools to help, all the way to paid marketplaces.

Learning gotten a lot better in the last 6 months since people started learning how to use AI generated prompts last year.