revert this

This commit is contained in:
kijai 2024-11-15 17:24:27 +02:00
parent 31639b4c79
commit 67c54b31e8
2 changed files with 3 additions and 33 deletions

View File

@ -2321,31 +2321,6 @@ def patched_load_lora_for_models(model, clip, lora, strength_model, strength_cli
model.add_object_patch(k, compiled_block)
return (new_modelpatcher, new_clip)
def patched_write_atomic(
path_: str,
content: Union[str, bytes],
make_dirs: bool = False,
encode_utf_8: bool = False,
) -> None:
# Write into temporary file first to avoid conflicts between threads
# Avoid using a named temporary file, as those have restricted permissions
from pathlib import Path
import os
import shutil
import threading
assert isinstance(
content, (str, bytes)
), "Only strings and byte arrays can be saved in the cache"
path = Path(path_)
if make_dirs:
path.parent.mkdir(parents=True, exist_ok=True)
tmp_path = path.parent / f".{os.getpid()}.{threading.get_ident()}.tmp"
write_mode = "w" if isinstance(content, str) else "wb"
with tmp_path.open(write_mode, encoding="utf-8" if encode_utf_8 else None) as f:
f.write(content)
shutil.copy2(src=tmp_path, dst=path) #changed to allow overwriting cache files
os.remove(tmp_path)
class PatchModelPatcherOrder:
@classmethod
def INPUT_TYPES(s):
@ -2403,13 +2378,6 @@ class TorchCompileModelFluxAdvanced:
return blocks
def patch(self, model, backend, mode, fullgraph, single_blocks, double_blocks, dynamic):
if platform.system() == 'Windows':
try:
import torch._inductor.codecache
torch._inductor.codecache.write_atomic = patched_write_atomic #temporary workaround for the cache write bug in Windows
import torch
except:
pass
single_block_list = self.parse_blocks(single_blocks)
double_block_list = self.parse_blocks(double_blocks)
m = model.clone()

View File

@ -47,7 +47,9 @@ app.registerExtension({
)
if (pythongossFeed) {
console.warn("KJNodes - Overriding pysssss.FaviconStatus")
app.extensions = app.extensions.filter(item => item !== pythongossFeed);
pythongossFeed.setup = function() {
console.warn("Disabled by KJNodes")
};
}
},
});