mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-22 17:43:33 +08:00
Compare commits
4 Commits
12f16f43aa
...
437cc2b706
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
437cc2b706 | ||
|
|
e50a36e05c | ||
|
|
9ef776b689 | ||
|
|
ed7c2c6579 |
2
nodes.py
2
nodes.py
@ -952,7 +952,7 @@ class UNETLoader:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {"required": { "unet_name": (folder_paths.get_filename_list("diffusion_models"), ),
|
||||
"weight_dtype": (["default", "fp8_e4m3fn", "fp8_e4m3fn_fast", "fp8_e5m2"],)
|
||||
"weight_dtype": (["default", "fp8_e4m3fn", "fp8_e4m3fn_fast", "fp8_e5m2"], {"advanced": True})
|
||||
}}
|
||||
RETURN_TYPES = ("MODEL",)
|
||||
FUNCTION = "load_unet"
|
||||
|
||||
14
server.py
14
server.py
@ -405,15 +405,15 @@ class PromptServer():
|
||||
if overwrite is not None and (overwrite == "true" or overwrite == "1"):
|
||||
pass
|
||||
else:
|
||||
# Get uploaded file size once
|
||||
image.file.seek(0, 2) # Seek to end
|
||||
uploaded_size = image.file.tell()
|
||||
image.file.seek(0) # Reset to beginning
|
||||
|
||||
# Get uploaded file size once
|
||||
image.file.seek(0, 2) # Seek to end
|
||||
uploaded_size = image.file.tell()
|
||||
image.file.seek(0) # Reset to beginning
|
||||
|
||||
i = 1
|
||||
while os.path.exists(filepath):
|
||||
# Quick size comparison first
|
||||
existing_size = os.path.getsize(filepath)
|
||||
# Quick size comparison first
|
||||
existing_size = os.path.getsize(filepath)
|
||||
if existing_size == uploaded_size:
|
||||
if compare_image_hash(filepath, image): #compare hash to prevent saving of duplicates with same name, fix for #3465
|
||||
image_is_duplicate = True
|
||||
|
||||
Loading…
Reference in New Issue
Block a user