sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: stable-diffusion-webui
Issue: [Bug]: Upscaler.py causes infinite loop (fix inside)
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [X] The issue has been reported before but has not been fixed yet

### What happened?

The current ([9d4fdc4](https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/9d4fdc45d3c4b9431551fd53de64a67726dcbd64)) copy of upscaler.py does not fix the 1x upscaler infinite loop issue: https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/upscaler.py.  Here is what is wrong ...

The if statement on line 59 checks three conditions simultaneously: img.width >= dest_w, img.height >= dest_h, and scale != 1.
The loop will break only if all three conditions are met. If any one of them is not met, the loop will continue to the next iteration.

**The code inside the loop does not include any logic for upscaling the image.** Without upscaling logic, the image dimensions will not change, and the conditions will not be reevaluated correctly.

There is no check to see if the dimensions of the image have changed after a potential upscaling operation. This means there's no way to break the loop if the upscaling doesn't affect the image dimensions.

So here's what I tried to do:

1. Check if the image dimensions are already at or above the desired width and height. If so, it breaks out of the loop.
2. Store the current dimensions of the image in shape.
3. Upscale the image using the do_upscale method and the selected model.
4. Check if the dimensions of the image are the same after upscaling. If so, it breaks out of the loop.

Remove lines 59-61 in upscaler.py and insert this instead

```
for _ in range(3):
            if img.width >= dest_w and img.height >= dest_h:
                break

            shape = (img.width, img.height)

            img = self.do_upscale(img, selected_model)

            if shape == (img.width, img.height):
                break
```

Hooray, it upscales now!

___________________

[sysinfo-2024-07-18-21-29.json](https://github.com/user-attachments/files/16289442/sysinfo-2024-07-18-21-29.json)

Chrome Version 126.0.6478.127 Windows 10 2080 GTX with 8GB

### Steps to reproduce the problem

Use any upscaler and set "upscale by" to 1x

### What should have happened?

Should've upscaled

### What browsers do you use to access the UI ?

Google Chrome

### Sysinfo

[sysinfo-2024-07-18-21-29.json](https://github.com/user-attachments/files/16289457/sysinfo-2024-07-18-21-29.json)


### Console logs

```Shell
wasn't saving them to txt sorry
```


### Additional information

_No response_
Repository: pytorch
Issue: DISABLED test_crash (__main__.TestCompileWorker)
Labels: triaged,module: flaky-tests,skipped,oncall: pt2,module: inductor

Platforms: asan, linux

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_crash&suite=TestCompileWorker&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/27628026517).

Over the past 3 hours, it has been determined flaky in 3 workflow(s) with 3 failures and 3 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_crash`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.



<details><summary>Sample error message</summary>

```
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/test/inductor/test_compile_worker.py", line 50, in test_crash
    pool.shutdown()
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/compile_worker/subproc_pool.py", line 193, in shutdown
    self.process.wait(10)
  File "/opt/conda/envs/py_3.10/lib/python3.10/subprocess.py", line 1209, in wait
    return self._wait(timeout=timeout)
  File "/opt/conda/envs/py_3.10/lib/python3.10/subprocess.py", line 1951, in _wait
    raise TimeoutExpired(self.args, timeout)
subprocess.TimeoutExpired: Command '['/opt/conda/envs/py_3.10/bin/python', '/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/compile_worker/__main__.py', '--workers=2', '--parent=24149']' timed out after 10 seconds
```

</details>


Test file path: `inductor/test_compile_worker.py`

cc @clee2000 @ezyang @anijain2305 @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire
Repository: rust
Issue: `std::ptr::drop_in_place` docs suggest overwriting value with `write`, which can lead to unsoundness in common cases
Labels: A-docs,T-libs

### Location

[std](https://doc.rust-lang.org/std/index.html)::[ptr](https://doc.rust-lang.org/std/ptr/index.html)::[drop_in_place](https://doc.rust-lang.org/std/ptr/fn.drop_in_place.html#)

>[write()](https://doc.rust-lang.org/std/ptr/fn.write.html) can be used to overwrite data without causing it to be dropped

### Summary

I was looking for a way to drop a `!Unpin` future in place in https://github.com/StoicDeveloper/mapped_futures/issues/4 and thought `drop_in_place` was the _obvious_ choice, and after reading the safety docs, which specifically mention write(), I came up with this inadvertently unsound code:

```rust
// Cell is an UnsafeCell<Option<impl !Unpin>> that is possibly Pin, so cannot move
unsafe {
    cell.get().drop_in_place();
    cell.get().write(None);
}
```

Admittedly, this was my mistake for not reading the example closely, which makes it obvious, but I was probably reading what I wanted to read at the time because `drop_in_place` was the "obvious" correct choice for dropping a Future in place. But I think if the example wasn't there, it would not be clear to many (most?) readers that this code was unsound from the `Safety` section alone.

While I think the unsoundness of my code is implied by 
`While drop_in_place is executing, the only way to access parts of to_drop...` and `using the pointed-to value after calling...` it's unclear that it includes Drop handlers for containers that may attempt to drop value again during unwinding. I think it would help if the docs specifically mentioned panicking and unwinding.

It would also help if it suggested alternate ways to drop and replace a value in place. I would not have guessed `*cell.get() = None` is the best option (which is used internally in futures-rs). But it's not obvious that that was an option since it looks like it could move the value, where `cell.get().drop_in_place()` _looks_ more correct because it is explicit about dropping without moving.
Repository: PowerToys
Issue: Peek does not enable NVIDIA RTX Super Resolution for videos
Labels: Issue-Bug,Needs-Triage,Product-Peek

### Microsoft PowerToys version

0.82.1

### Installation method

WinGet

### Running as admin

None

### Area(s) with issue?

Peek

### Steps to reproduce

In MS Edge, in edge://settings/system, the "Enhance videos in Microsoft Edge" option is enabled, and "Preferred method of video enhancement:" is set to "Graphics driver enhancement".

In NVIDIA Control Panel, for a RTX Series 4 GPU, in "Adjust video image settings", the RTX video enhancement option "Super resolution" is enabled.

When playing videos in a regular MS Edge session, the media is upscaled, as expected. However, when using Peek, the video preview window doesn't upscale the media, and NVIDIA doesn't show the super resolution functionality as active.
Checking how Peek handles videos, I understood that it uses EdgeWebView, using a temporary profile in C:\Users\*\AppData\LocalLow\Microsoft\PowerToys\Peek-Temp\EBWebView\Default. CHecking the Preferences json file, I can see the following options missing:

```
    "video_enhancement": {
        "enabled": true,
        "mode": "Graphics driver enhancement"
    },
```

I tried to edit manually, but the file is reverted. Not sure if it's a standard setup from Mediasource component or from Peek itself, but I would guess that having the settings above would enable the super resolution support for the embedded video player from Peek.







### ✔️ Expected Behavior

Peek would trigger NVIDIA Super Resolution for videos, if such option is enabled in MS Edge (alternatively, could be a separated option in PowerToys/Peek itself, to decouple from Edge)

### ❌ Actual Behavior

No upscaling / no super resolution functionality

### Other Software

_No response_
Repository: transformers
Issue: Checkpoint validation as an option
Labels: Feature request

### Feature request

Added `validate_checkpoint_key: bool` in `from_pretrained`

### Motivation

When pytorch loads state dict there is an option `strict=True` but there is no counterpart in `from_pretrained`. If people saved the pretrained model incorrectly, the incorrect keys can silently pass through.

### Your contribution

There is already an validation step in the `from_pretrained` one just need to raise the error if `validate_checkpoint_key=True`
Repository: neovim
Issue: Add LSP client flag to pull diagnostics on save
Labels: enhancement,lsp

### Problem

Now that neovim 10 supports pull diagnostics, I think it'd be useful to expose some additional flags to control how often diagnostic requests are sent.

Right now, diagnostics are requested after each `didChange` event, which can be controlled partially via existing lsp client flags like `debounce_text_changes`: https://neovim.io/doc/user/lsp.html#_lua-module:-vim.lsp.client

Some lsp servers like eslint expose options to run diagnostics on save, since they can be a little slow. [With pull diagnostics, those settings have to be on the client-side to function](https://github.com/neovim/nvim-lspconfig/issues/3211).

### Expected behavior

To start, I propose adding a new flag `pull_diagnostics_on_save` that sends diagnostic requests after `didSave` instead of `didChange` for that lsp client.

Any thoughts or concerns? I'm happy to try implementing if it sounds like a reasonable idea!
Repository: godot
Issue: RectangleShape2D Differs In-Game
Labels: bug,topic:rendering,topic:physics,needs testing,topic:2d

### Tested versions

4.2.2-stable, 4.3-beta3

### System information

Windows 10 IoT Enterprise LTSC, 64 bits, 10.0.19044.4529

### Issue description

`RectangleShape2D` differs in-game from the editor. This does not appear to be a visual bug with `Visible Collision Shapes`, as objects lined up one pixel away from each other and moving in parallel will detect a collision and stop.

![github_bug_1](https://github.com/user-attachments/assets/3431d67c-247b-4132-a9f0-3ca0f515be80)

https://github.com/user-attachments/assets/99b7bc39-404e-49d5-9bfa-e0ef9f55211e

It seems to happen only with the top and left sides of the collision shape, not the right or bottom.

It should be noted this is only clear with `viewport` scaling—`canvas_items` displays the `CollisionShape2D` properly adjusted to the sprite, although the issue remains:

https://github.com/user-attachments/assets/5999e83c-158c-4336-83f1-35aa74ff8bb2

### Steps to reproduce

1. For visualization, set a low viewport resolution (e.g. 320x180) and scaling to `viewport`, `integer`
2. Create a `CharacterBody2D`
3. As children, add `Sprite2D` and `CollisionShape2D`
4. Set `CollisionShape2D` to `RectangleShape2D` and adjust the dimensions
5. Repeat steps 2-4 with a `StaticBody2D` instead of a `CharacterBody2D`
6. In `CharacterBody2D`, implement any simple movement code with collision detection
7. Create a generic scene, with both the `CharacterBody2D` and `StaticBody2D` scenes
8. Set both of the scenes one pixel away from each other
9. Enable `Visible Collision Shapes`
10. Run the scene; both of the `CollisionShape2D` will look shifted
11. Move `CharacterBody2D` parallel to `StaticBody2D`
12. `CharacterBody2D` will detect a collision with `StaticBody2D` and stop

### Minimal reproduction project (MRP)

[godot_bug_test-v4.2.2.zip](https://github.com/user-attachments/files/16298835/godot_bug_test-v4.2.2.zip)
Repository: vscode
Issue: Incorrect sticky scroll line, only occurs when file is first opened
Labels: bug,editor-sticky-scroll

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Version: 1.91.1 (user setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

I'm seeing a mysterious incorrect sticky scroll line which only occurs the first time I open a file.  Seems like a bug, since it should be consistent.  I originally repro'ed this with the C/C++ extension, having changed the sticky scroll mode to `foldingProviderModel`, and confirmed that only a single range was being generated by the provider.  Indenting the line causes it no longer be a sticky line, then removing the indentation causes it to be picked up again.  It seems like when the file is initially opened, both indent-level and folding-provider stick scroll modes are being applied.


https://github.com/user-attachments/assets/2db2d554-5e51-40c6-b3e7-56a273059adb
Repository: pytorch
Issue: DISABLED test_new_spectral_norm_forward_swap_True (__main__.TestNNParametrization)
Labels: module: nn,triaged,module: flaky-tests,skipped,oncall: pt2,module: dynamo

Platforms: dynamo

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_new_spectral_norm_forward_swap_True&suite=TestNNParametrization&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/27632528703).

Over the past 3 hours, it has been determined flaky in 9 workflow(s) with 18 failures and 9 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_new_spectral_norm_forward_swap_True`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.



<details><summary>Sample error message</summary>

```
Traceback (most recent call last):
  File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/testing/_internal/common_utils.py", line 2905, in wrapper
    raise RuntimeError(f"Unexpected success, please remove `test/dynamo_expected_failures/{test_name}`")
RuntimeError: Unexpected success, please remove `test/dynamo_expected_failures/TestNNParametrization.test_new_spectral_norm_forward_swap_True`
```

</details>


Test file path: `nn/test_parametrization.py`

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @clee2000 @wdvr @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @ezyang @anijain2305
Repository: pytorch
Issue: DISABLED test_method_overloading (__main__.TestScript)
Labels: oncall: jit,triaged,module: flaky-tests,skipped,oncall: pt2,module: dynamo

Platforms: dynamo

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_method_overloading&suite=TestScript&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/27632501251).

Over the past 3 hours, it has been determined flaky in 10 workflow(s) with 10 failures and 10 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_method_overloading`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.



<details><summary>Sample error message</summary>

```
Traceback (most recent call last):
  File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/testing/_internal/common_utils.py", line 2905, in wrapper
    raise RuntimeError(f"Unexpected success, please remove `test/dynamo_expected_failures/{test_name}`")
RuntimeError: Unexpected success, please remove `test/dynamo_expected_failures/TestScript.test_method_overloading`
```

</details>


Test file path: `test_jit.py`

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @clee2000 @wdvr @chauhang @penguinwu @voznesenskym @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @jiayisunx @chenyang78 @kadeng @amjames @ezyang @anijain2305
Repository: rust
Issue: rustdoc leaks private types in Implementations on Foreign Types
Labels: T-rustdoc,C-bug

### Problem

When a `pub` `trait` is implemented on a constructed type—not counting references if those are "type constructors"—that was constructed based on a private type, it is shown in the documentation. Ideally it would not do this as I like private types to not leak into my documentation. The type constructor has to be `pub` of course (e.g., a `slice`).

### Steps

```rust
/// `Foo`.
pub trait Foo {}
/// `Fizz`.
struct Fizz;
impl Foo for [Fizz] {}
```

`cargo doc --open` will generate documentation that shows the `trait` `Foo`. When clicking on it, it will show `impl Foo for [Fizz]` under "Implementations on Foreign Types".

### Possible Solution(s)

_No response_

### Notes

_No response_

### Version

```text
[zack@laptop src]$ cargo version --verbose
cargo 1.79.0 (ffa9cf99a 2024-06-03)
release: 1.79.0
commit-hash: ffa9cf99a594e59032757403d4c780b46dc2c43a
commit-date: 2024-06-03
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.3 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Arch Linux [64-bit]
```
Repository: PowerToys
Issue: PowerToys Run / Dynamic Number of results shown before scrolling 
Labels: Idea-Enhancement,Product-PowerToys Run,Needs-Triage

### Description of the new feature / enhancement

Under PowerToys Run, Search & results:

"Number of results shown before scrolling": Int

This configuration needs to be adjusted to allow for a auto-adjusting number of results depending on the amount of available space.

Min and Max Numbers or equivalent could alleviate this. 

### Scenario when this would be used?

For users with different screen sizes and aspect ratios, for example my use case:

Central Workstation with wiring to multiple rooms for access points, each with different screen vertical real estate and peripherals.
On top of that, accessing it from multiple mobile devices via RDP or equivalent (even smaller vertical real estate)

**Physicals:**
- Single Screen with 3840px of vertical real estate. 
- Four Screens: Two 1440px vertical + One 2160px vertical+ One 3840px vertical
- Single Screen: 1440px

**Remote:**
- 1000px
- 1205px
- 1308px 

Allowing for the feature to exist, the window would show the max number of things it can in the 3840px vertical and would do so too in all the smaller resolutions all the way down to RDP.

### Supporting information

Microsoft has spent a lot of time and effort getting the OS to work perfectly with Touch & Smaller Screen sizes and for the most part they have accomplished it. See: The Taskbar, which not many understood why it was being rewritten, and now is amazing for tablets among other things. 

One area where the taskbar comes short at the moment is when you have too many Windows Open. Alt Tab or Win Tab fall short. And PowerToys Run solves this by letting you search/visualize open windows. 

This tool becomes a must once you realize you can use it as a filterable version of Alt Tab and Win Tab. Which on a device with a small screen is an absolute must when you have are connecting to a device with more apps open than horizontal screen space to list them twice ( new scroll function kicks in even in desktop ).

![image](https://github.com/user-attachments/assets/9307735e-7b0d-405f-ab1f-5905247ee554)

^ Who wants to use that even in Desktop, when you can filter with PowerToys Run? **''orz**
Repository: pytorch
Issue: Proposal for CUDA-Accelerated Dynamic Time Warping (DTW) Implementation in PyTorch
Labels: module: nn,triaged

### 🚀 The feature, motivation and pitch

DTW is a crucial algorithm for measuring similarity between temporal sequences, but its computational complexity can be a bottleneck, particularly with large datasets. Accelerating DTW using CUDA will leverage GPU parallelism to provide faster computations, addressing the needs of the community for more efficient time-series analysis tools.

Implementation Overview:

- CUDA Kernel for Forward Computation: Computes the DTW cost matrix using CUDA for parallel execution.
- CUDA Kernel for Backward Computation: Calculates gradients for backpropagation in CUDA.
- Custom PyTorch Function: Integrates the CUDA kernels with PyTorch's autograd system.
- Numba-accelerated CPU Fallback: Provides a CPU implementation using Numba for systems without CUDA support.
- High-level PyTorch Module: Offers a user-friendly interface for applying the DTW algorithm within PyTorch models.



### Alternatives

- Continue using CPU-based DTW implementations, which are slower and less scalable.
- Use third-party GPU-accelerated DTW libraries, which may not integrate as seamlessly with PyTorch.

### Additional context

I have done development of the algorithm and might be starting Testing soon.

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki