sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: stable-diffusion-webui
Issue: [Feature Request]:  Add System-level optimization for CPU inference to wiki
Labels: documentation

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

The work on the CPU can be quite long.
Using some system optimizations, borrowed from [HuggingFace](https://huggingface.co/blog/stable-diffusion-inference-intel), it turned out to increase the speed of work from 1.25x to 1.5x.

For my inference:

- Xeon E3 1265L v3 (16Gb, 4 core) speed up from 10s/it to 8s/it
- Ryzen 9 7950X (32Gb, 16 core) speed up from 2.54s/it to 1.7s/it

### Proposed workflow

I added the following lines to the end of the webui-user.sh file:

export OMP_NUM_THREADS=16
export MKL_NUM_THREADS=16
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so:$LD_PRELOAD
export MALLOC_CONF="oversize_threshold:1,background_thread:true,metadata_thp:auto,dirty_decay_ms: 60000,muzzy_decay_ms:60000"
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libiomp5.so:$LD_PRELOAD

Having previously installed

- sudo apt-get install -y libjemalloc-dev
- sudo apt-get install intel-mkl

### Additional information

Other system informations:

COMMANDLINE_ARGS="--precision autocast --use-cpu all --no-half --opt-channelslast --skip-torch-cuda-test --enable-insecure-extension-access"

python: 3.10.6  •  torch: 2.1.0.dev20230506+cpu  •  xformers: N/A  •  gradio: 3.28.1  •  commit: [5ab7f213](https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/5ab7f213bec2f816f9c5644becb32eb72c8ffb89)  •  checkpoint: [b4391b7978](https://google.com/search?q=b4391b7978d973427a4a2a3ed0e67b18ebe34e213904575043d6c9faec75c22d)

OS Ubuntu 22.04
Repository: godot
Issue: Getting empty Parser Errors after converting Godot 3 project
Labels: usability,regression

### Godot version

v4.0.3.rc2.official [2ac4e3bb3]

### System information

Windows 10

### Issue description

I converted Godot 3 project to Godot 4 using v4.0.3.rc2. Conversion didn't fix everything as expected and I fixed a few minor problems. Then I got an empty Parser Error:
![kuva](https://github.com/godotengine/godot/assets/49998025/22ba3426-25ca-42de-97c5-a9d0ce7bb5c7)
No additional information, no file, no line number, nothing.

Then I opened the same project with v4.0.2.stable.official [7a0977ce2], and now I got proper errors like:
![kuva](https://github.com/godotengine/godot/assets/49998025/0ba74138-9749-43c7-a4fd-0969d9c11fa3)
I fixed a few problems and tried the v4.0.3.rc2 again, but it just gives that empty Parser Error.

**Update:** It seemed first that the v4.0.2.stable works fine, but after fixing some Godot 3 stuff, it too started to give empty Parser Errors, making it pretty much impossible to fix the project. I also tried v4.0.1.stable.official [cacf49999] and v4.0.stable.official [92bee43ad], but all of them give empty Parser Errors.

**Update 2:** I managed to see errors by starting `Godot_v4.0.3-rc2_win64_console.exe`. These are the errors:

```
SCRIPT ERROR: Parse Error: The method "get_global_position" overrides a method from native class "Node2D". This won't be called by the engine and may not work as expected. (Warning treated as error.)
          at: GDScript::reload (res://waves/enemy_pathfollow.gd:20)
SCRIPT ERROR: Parse Error: Invalid operand of type "Array" for unary operator "not".
          at: GDScript::reload (res://enemies/pathfollower.gd:40)
SCRIPT ERROR: Parse Error: Could not resolve member "get_global_position".
          at: GDScript::reload (res://enemies/pathfollower.gd:49)
ERROR: Script does not inherit from Node: res://utils.gd.
   at: (editor/editor_autoload_settings.cpp:423)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:70)
SCRIPT ERROR: Parse Error: Closing ")" doesn't match the opening "(".
          at: GDScript::reload (res://utils.gd:193)
```

It would still be nice to see the errors in the GUI too.

### Steps to reproduce

May be reproducible by converting a Godot 3 project.

I made a very small project with v4.0.3.rc2 which does this:
```gdscript 
extends Node2D
func _ready() -> void:
	var s = String(1)
```
This produces a proper `Parser Error: No constructor of "String" matches the signature "String(int)".` so it seems that the empty Parser Error doesn't depend on any specific error. 

### Minimal reproduction project

N/A
Repository: stable-diffusion-webui
Issue: [Feature Request]: Add support for autocast bfloat16 for generate on the latest CPUs
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Many modern processors have bfloat16 support such as AMD Zen4, Apple M2, Intel Cooper Lake, Intel Sapphire Rapids.

By using autocast bfloat16 I doubled the performance.

- Ryzen 9 7950X (32Gb) speedup from 0.625 it/s to 1.3 it/s

### Proposed workflow

1. Change in ./modules/devices.py 

Add return torch.autocast(enabled=True, dtype= torch.bfloat16, device_type='cpu', cache_enabled=True) in autocast functions.

```
def autocast(disable=False):
    from modules import shared

    if disable:
        contextlib.nullcontext()

    if dtype == torch.float32 or shared.cmd_opts.precision == "full":
        return torch.autocast(enabled=True, dtype= torch.bfloat16, device_type='cpu', cache_enabled=True) # contextlib.nullcontext()

    return torch.autocast("cuda")
```

2. Change in ./modules/sd_samplers_common.py 
Add  if x_sample.dtype == torch.bfloat16: x_sample = x_sample.to(torch.float16) in single_sample_to_image, because numpy dont work with bfloat16 yet.

```
def single_sample_to_image(sample, approximation=None):
    if approximation is None:
        approximation = approximation_indexes.get(opts.show_progress_type, 0)

    if approximation == 2:
        x_sample = sd_vae_approx.cheap_approximation(sample)
    elif approximation == 1:
        x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()
    else:
        x_sample = processing.decode_first_stage(shared.sd_model, sample.unsqueeze(0))[0]

    x_sample = torch.clamp((x_sample + 1.0) / 2.0, min=0.0, max=1.0)
    if x_sample.dtype == torch.bfloat16:
        x_sample = x_sample.to(torch.float16)
    x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2)
    x_sample = x_sample.astype(np.uint8)
    return Image.fromarray(x_sample)
```


### Additional information

Other system informations:

COMMANDLINE_ARGS="--precision autocast --use-cpu all --no-half --opt-channelslast --skip-torch-cuda-test --enable-insecure-extension-access"

python: 3.10.6  •  torch: 2.1.0.dev20230506+cpu  •  xformers: N/A  •  gradio: 3.28.1  •  commit: [5ab7f213](https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/5ab7f213bec2f816f9c5644becb32eb72c8ffb89)  •  checkpoint: [b4391b7978](https://google.com/search?q=b4391b7978d973427a4a2a3ed0e67b18ebe34e213904575043d6c9faec75c22d)

OS Ubuntu 22.04

P.S. Since I'm still just a beginner programmer, the changes were made only as a proof of concept.

I was able to check the main functionality and practically and got a generation error only with the Stable Diffusion 2.1 model, the rest of the functionality worked at 2X increase in speed.
Repository: excalidraw
Issue: linux/arm64/v8
Labels: More information needed / cannot reproduce

Please make version work with linux/arm64/v8
Repository: tensorflow
Issue: Numpy and tf experimental Numpy differ in vander matrix creation case for N=0
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.11

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

2.11.0

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 22.04 jammy

### Mobile device

_No response_

### Python version

3.8.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

11.6

### GPU model and memory

_No response_

### Current Behaviour?

The behaviour of `tf.experimental.numpy.vander` is different than `np.vander` for `N=0` where both value and shape of the output differ.

### Standalone code to reproduce the issue

```shell
import numpy as np        # 1.23.5
import tensorflow as tf   # 2.11.0

xn = np.array([1], dtype=np.int32)
x = tf.constant([1], dtype=tf.int32)
print(np.vander(xn, 0))
print()
print(tf.experimental.numpy.vander(x, 0))
```


### Relevant log output

```shell
[]

tf.Tensor([[1]], shape=(1, 1), dtype=int32)
```
</details>
Repository: tensorflow
Issue: control_flow_ops_test unit test is flaky
Labels: stat:awaiting tensorflower,type:bug,type:build/install,comp:ops,subtype: ubuntu/linux

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

git HEAD

### Custom Code

No

### OS Platform and Distribution

Ubuntu 20.04

### Mobile device

n/a

### Python version

3.9.16

### Bazel version

5.3.0

### GCC/Compiler version

10.2.1

### CUDA/cuDNN version

n/a

### GPU model and memory

n/a

### Current Behaviour?

//tensorflow/python/ops/parallel_for:control_flow_ops_test fails occasionally due to difference exceeding tolerance.

See https://github.com/tensorflow/tensorflow/actions/runs/5012758324/jobs/8985082872#step:5:29789



### Standalone code to reproduce the issue

```shell
bazel test --build_tests_only --config=mkl_aarch64_threadpool --copt=-flax-vector-conversions --test_env=TF_ENABLE_ONEDNN_OPTS=1 --test_env=TF2_BEHAVIOR=1 --define=no_tensorflow_py_deps=true --test_lang_filters=py --test_size_filters=small,medium --test_output=errors --verbose_failures=true --test_keep_going --notest_verbose_timeout_warnings --local_test_jobs=64 --test_tag_filters=-nopip,-no_pip,-oss_serial,-no_oss,-oss_excluded,-v1only,-benchmark-test,-no_aarch64,-no_oss_py38,-no_oss_py39,-no_oss_py310 -k -- //bazel_pip/tensorflow/... -//bazel_pip/tensorflow/compiler/tf2tensorrt/... -//bazel_pip/tensorflow/compiler/xrt/... -//bazel_pip/tensorflow/core/tpu/... -//bazel_pip/tensorflow/go/... -//bazel_pip/tensorflow/java/... -//bazel_pip/tensorflow/python/integration_testing/... -//bazel_pip/tensorflow/tools/toolchains/... -//bazel_pip/tensorflow/lite/... -//bazel_pip/tensorflow/python/kernel_tests/nn_ops:atrous_conv2d_test -//bazel_pip/tensorflow/python/kernel_tests/nn_ops:conv_ops_test
```


### Relevant log output

```shell
AssertionError: 
Not equal to tolerance rtol=0.0001, atol=1e-05
Mismatched value: a is different from b. 
not close where = (array([0]), array([0]), array([0]), array([1]), array([4]), array([0]))
not close lhs = [0.]
not close rhs = [0.77603436]
not close dif = [0.77603436]
not close tol = [8.760343e-05]
dtype = float32, shape = (3, 3, 2, 12, 12, 3)
Mismatched elements: 1 / 7776 (0.0129%)
Max absolute difference: 0.77603436
Max relative difference: 1.
 x: array([[[[[[0.      , 0.      , 0.712515],
           [0.      , 0.889897, 0.      ],
           [0.      , 0.      , 0.      ],...
 y: array([[[[[[0.      , 0.      , 0.712515],
           [0.      , 0.889897, 0.      ],
           [0.      , 0.      , 0.      ],...
```
</details>
Repository: next.js
Issue: 405 thrown in production for pages served via POST but renders fine in dev
Labels: bug,Pages Router

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
    Binaries:
      Node: 19.4.0
      npm: 9.2.0
      Yarn: N/A
      pnpm: 7.1.5
    Relevant packages:
      next: 12.1.6
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Data fetching (gS(S)P, getInitialProps)

### Link to the code that reproduces this issue

N/A (no simple way to host replica since only affected via `nextApp.render()` calls within POST responses

### To Reproduce

- Set up a basic custom server to render next pages via a POST request
```
require('dotenv').config();
const { parse } = require('url');
const express = require('express');
const next = require('next');

const dev = process.env.NODE_ENV !== 'production';
const PORT = process.env.REACT_PORT || 3000;

const nextApp = next({ dev });
const handle = nextApp.getRequestHandler();

const app = express();
app.use([express.urlencoded({ extended: true }), express.json()]);

nextApp.prepare().then(() => {
  // Static Assets 
  app.get('*', async (req, res) => handle(req, res));

  // Pages
  app.post('*', async (req, res) => {
      const { pathname, query } = parse(req.url, true);
      await nextApp.render(req, res, pathname, query);
  });

  app.listen(PORT, () => console.log(`> Next running on port on ${PORT}`));
});
```
- Add a Next page to the `pages` dir that **does not** include a `getServerSideProps` export
- Submit a POST request to this page in dev & production

### Describe the Bug

#### Dev Mode
Works perfectly 👍 

#### Production
Throws a 405 for attempting to render within a POST request 👎 

### Expected Behavior

#### Dev Mode
Works perfectly 👍 

#### Production
Works perfectly 👍 

### Which browser are you using? (if relevant)

N/A

### How are you deploying your application? (if relevant)

N/A
Repository: vscode
Issue: Don't display keyboard toolbar on iOS
Labels: feature-request,editor-core,ios-ipados

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
When using with an external keyboard on an iPhone, the toolbar is still visible and taking up space on screen.
I wish there was a setting for not displaying the keyboard toolbar.

<img width="975" alt="Screenshot 2023-05-18 at 19 14 19" src="https://github.com/microsoft/vscode/assets/2729020/cd522c7a-a50c-4663-997a-7239a31776f6">
Repository: go
Issue: net/http: TestNoSniffExpectRequestBody failures
Labels: NeedsInvestigation

```
#!watchflakes
post <- pkg == "net/http" && test == "TestNoSniffExpectRequestBody"
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/ad61c88480d15c1d7b42bd81c56231ff3005a931)):

    --- FAIL: TestNoSniffExpectRequestBody (0.00s)
        --- FAIL: TestNoSniffExpectRequestBody/h2 (16.38s)
            clientserver_test.go:1388: unexpected Read call
            clientserver_test.go:1409: read tcp 127.0.0.1:51036->127.0.0.1:51035: read: connection reset by peer


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: PowerToys
Issue: Get all text copied inside an image!
Labels: Needs-Triage

### Description of the new feature / enhancement

Let, Suppose I am browsing my screenshots album, and there is lot of text inside in those screenshots which I want to copy. So, there should be option to get all the text copied inside an image to clipboard by choosing over image's context menu. Like an OCR!

### Scenario when this would be used?

We capture lot of screenshots, having textual information. The text we want to use at another App.

### Supporting information

_No response_
Repository: godot
Issue: GD.LogRich logs escape codes to log files
Labels: discussion,topic:core

### Godot version

v4.0.2.stable.mono.official [7a0977ce2]

### System information

Windows 10

### Issue description

I've been toying around with rich text logging on Windows and noticed that the added escape codes are being logged in the log files as well.

Ideally I believe these shouldn't exist in the log files.

### Steps to reproduce

1. Enable File Logging in `Project Settings > General > Debug > File Logging > Enable File Logging`
2. Run a script that calls `GD.PrintRich("[color=green]Hello World[/color]");`
3. Open the log file in `%appdata%/Godot/app_userdata/your_project/godot.log`

### Minimal reproduction project

N/A
Repository: rust
Issue: Medium Array of Vecs cloned causes stack overflow but doesn't provide any details
Labels: A-diagnostics,T-compiler

### Code

```Rust
fn main() {
    const EMPTY: Vec<u32> = vec![];
    let mut grid: [Vec<u32>; 2500] = [EMPTY; 2500];

    let grid_clone = grid.clone();
}
```


### Current output

```Shell
thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\t.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
```


### Desired output

```Shell
thread 'main' has overflowed its stack
stack overflow caused by clone() on line 5
error: process didn't exit successfully: `target\debug\t.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
```


### Rationale and extra context

_No response_

### Other cases

_No response_

### Anything else?

_No response_
Repository: PowerToys
Issue: Incorrect capitalization of exponent 'n' in exponential notation
Labels: Issue-Bug,Product-Quick Accent

### Microsoft PowerToys version

0.69.1

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Quick Accent

### Steps to reproduce


https://github.com/microsoft/PowerToys/assets/52745962/5445a023-be84-423a-98d0-96968cedce1c



### ✔️ Expected Behavior

'N' to 'ᴺ'

### ❌ Actual Behavior

'N' to 'ⁿ'

### Other Software

_No response_
Repository: TypeScript
Issue: Poor formatting in "move to file" when target file has one trailing newline
Labels: Bug,Help Wanted,Domain: Refactorings,Rescheduled

Here's `hello.ts`:

```ts
import { World } from "./world";

export function getHello() {
    return "hello";
}

export function getWorld(): World {
    return "world";
}
```

Here's `world.ts`

```ts
export type World = "world";

```

Notice there is a trailing newline in `world.ts`.

Move `getWorld` to `world.ts`, and what you will get is

```ts
import { World } from "./world";

export type World = "world";export function getWorld(): World {
    return "world";
}


```

Notice that `getWorld` is not given its own line, and there are two trailing newlines.

What would be expected is:

```ts
import { World } from "./world";

export type World = "world";

export function getWorld(): World {
    return "world";
}

```
Repository: PowerToys
Issue: Interest in Contributing StickyThumbs to PowerToys
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

I recently released [StickyThumbs](https://github.com/Dealman/StickyThumbs) and had some suggestions to look into contributing it to PowerToys.

Basically, it creates a DWM thumbnail of a chosen process which has a valid `MainWindowHandle`. The user can then move these around, resize them and zoom in/out. They are all currently rendered as topmost, but this can be made optional via the overlay system I have.

### Scenario when this would be used?

For me personally I mostly use it if I need a preview of a game I have running in the background while doing some work, but I also use it sometimes to have a preview of, for example Notepad on top of another program.

You can also double-click the thumbnails to have that window focused, could potentially be good for some production stuff I suppose.

### Supporting information

I'm looking to gauge interest, since if it were to be added I think it has a wee bit of refactoring and more testing to be done. I for example currently do not use any interfaces or commands, it's quite simplistic.
Repository: TypeScript
Issue: "Move to file" carries forward imports to target file
Labels: Bug,Domain: Refactorings

Here's `hello.ts`:

```ts
import { World } from "./world";

export function getHello() {
    return "hello";
}

export function getWorld(): World {
    return "world";
}
```

Here's `world.ts`

```ts
export type World = "world";

```

Here's what "move to file" will generate to `world.ts`:

```ts
import { World } from "./world";

export type World = "world";export function getWorld(): World {
    return "world";
}


```

Notice that the import for `World` is brought over to the target file.
Repository: TypeScript
Issue: "Move to file" does not merge with existing import lists in target file
Labels: Bug,Domain: Refactorings

`basics.ts`

```ts
export function getHello() {
    return "hello";
}
```

`greeting.ts`

```ts
import { getHello } from "./basics";

export function getWorld() {
    return "world";
}

export function getGreeting() {
    return getHello() + getWorld();
}
```

Extract `getWorld` to `basics.ts`, and this is what `greeting.ts` will look like:

```ts
import { getWorld } from "./basics";
import { getHello } from "./basics";

export function getGreeting() {
    return getHello() + getWorld();
}
```

There should only be a single import list for `./basics`.
Repository: TypeScript
Issue: "Move to file" generates self-import when target file already imports declaration
Labels: Bug,Domain: Refactorings

Possibly the same as #54307.

`basics.ts`

```ts
export function getHello() {
    return "hello";
}

export function getWorld() {
    return "world";
}
```

`greeting.ts`

```ts
import { getHello, getWorld } from "./basics";

export function getGreeting() {
    return getHello() + getWorld();
}
```

Extract `getWorld` into `greeting.ts` and this is what it looks like:

```ts
import { getHello } from "./basics";
import { getWorld } from "./greeting";

export function getGreeting() {
    return getHello() + getWorld();
}
export function getWorld() {
    return "world";
}
```

The line `import { getWorld } from "./greeting";` should not be present at all
Repository: flutter
Issue: WIP UIA text provider breaks Narrator
Labels: a: accessibility,platform-windows,a: desktop,P2,team-windows,triaged-windows

UIA, which is currently disabled, has suffered a regression since we last tried to enable it wrt to Windows Narrator. Narrator fails to query the text contained in elements that provide the `UIA_TextPatternId` pattern, and reads "no item in view" instead. This was previously not an issue. I have yet to identify any changes in relevant source files that could have caused this.

NVDA does not suffer from this issue.  
When the text and value patterns are provided, Narrator reads "no item in view".  
When only the value pattern is provided, Narrator reads the value properly, but text-specific features will not be available.
When only the text pattern is provided, Narrator only reads the control type and optional semantics name, and does not read the contained text.