mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-22 04:10:15 +08:00
Fix downloads and tests on Linux
This commit is contained in:
parent
7ce781b0fd
commit
e84bf5f025
@ -13,8 +13,9 @@ from os.path import join
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional, Final, Set
|
from typing import List, Optional, Final, Set
|
||||||
|
|
||||||
|
import requests
|
||||||
import tqdm
|
import tqdm
|
||||||
from huggingface_hub import dump_environment_info
|
from huggingface_hub import dump_environment_info, try_to_load_from_cache
|
||||||
from huggingface_hub import hf_hub_download, scan_cache_dir, snapshot_download, HfFileSystem, CacheNotFound
|
from huggingface_hub import hf_hub_download, scan_cache_dir, snapshot_download, HfFileSystem, CacheNotFound
|
||||||
from huggingface_hub.utils import GatedRepoError, LocalEntryNotFoundError
|
from huggingface_hub.utils import GatedRepoError, LocalEntryNotFoundError
|
||||||
from requests import Session
|
from requests import Session
|
||||||
@ -143,6 +144,9 @@ def get_or_download(folder_name: str, filename: str, known_files: Optional[List[
|
|||||||
revision=known_file.revision,
|
revision=known_file.revision,
|
||||||
local_dir=hf_destination_dir if args.force_hf_local_dir_mode else None,
|
local_dir=hf_destination_dir if args.force_hf_local_dir_mode else None,
|
||||||
)
|
)
|
||||||
|
except requests.exceptions.HTTPError as exc_info:
|
||||||
|
if exc_info.response.status_code == 401:
|
||||||
|
raise GatedRepoError(f"{known_file.repo_id}/{known_file.filename}", response=exc_info.response)
|
||||||
except IOError as exc_info:
|
except IOError as exc_info:
|
||||||
logger.error(f"cannot reach huggingface {known_file.repo_id}/{known_file.filename}", exc_info=exc_info)
|
logger.error(f"cannot reach huggingface {known_file.repo_id}/{known_file.filename}", exc_info=exc_info)
|
||||||
except Exception as exc_info:
|
except Exception as exc_info:
|
||||||
@ -305,7 +309,7 @@ KNOWN_CHECKPOINTS: Final[KnownDownloadables] = KnownDownloadables([
|
|||||||
HuggingFile("stabilityai/stable-diffusion-3-medium", "sd3_medium_incl_clips_t5xxlfp8.safetensors"),
|
HuggingFile("stabilityai/stable-diffusion-3-medium", "sd3_medium_incl_clips_t5xxlfp8.safetensors"),
|
||||||
HuggingFile("fal/AuraFlow", "aura_flow_0.1.safetensors"),
|
HuggingFile("fal/AuraFlow", "aura_flow_0.1.safetensors"),
|
||||||
# stable audio, # uses names from https://comfyanonymous.github.io/ComfyUI_examples/audio/
|
# stable audio, # uses names from https://comfyanonymous.github.io/ComfyUI_examples/audio/
|
||||||
HuggingFile("stabilityai/stable-audio-open-1.0", "model.safetensors", save_with_filename="stable_audio_open_1.0.safetensors"),
|
HuggingFile("Comfy-Org/stable-audio-open-1.0_repackaged", "stable-audio-open-1.0.safetensors", alternate_filenames="stable_audio_open_1.0.safetensors"),
|
||||||
# hunyuandit
|
# hunyuandit
|
||||||
HuggingFile("comfyanonymous/hunyuan_dit_comfyui", "hunyuan_dit_1.0.safetensors"),
|
HuggingFile("comfyanonymous/hunyuan_dit_comfyui", "hunyuan_dit_1.0.safetensors"),
|
||||||
HuggingFile("comfyanonymous/hunyuan_dit_comfyui", "hunyuan_dit_1.1.safetensors"),
|
HuggingFile("comfyanonymous/hunyuan_dit_comfyui", "hunyuan_dit_1.1.safetensors"),
|
||||||
@ -502,7 +506,8 @@ KNOWN_APPROX_VAES: Final[KnownDownloadables] = KnownDownloadables([
|
|||||||
KNOWN_VAES: Final[KnownDownloadables] = KnownDownloadables([
|
KNOWN_VAES: Final[KnownDownloadables] = KnownDownloadables([
|
||||||
HuggingFile("stabilityai/sdxl-vae", "sdxl_vae.safetensors"),
|
HuggingFile("stabilityai/sdxl-vae", "sdxl_vae.safetensors"),
|
||||||
HuggingFile("stabilityai/sd-vae-ft-mse-original", "vae-ft-mse-840000-ema-pruned.safetensors"),
|
HuggingFile("stabilityai/sd-vae-ft-mse-original", "vae-ft-mse-840000-ema-pruned.safetensors"),
|
||||||
HuggingFile("black-forest-labs/FLUX.1-schnell", "ae.safetensors"),
|
# this is the flux VAE
|
||||||
|
HuggingFile("Comfy-Org/HiDream-I1_ComfyUI", "split_files/vae/ae.safetensors"),
|
||||||
HuggingFile("Comfy-Org/mochi_preview_repackaged", "split_files/vae/mochi_vae.safetensors"),
|
HuggingFile("Comfy-Org/mochi_preview_repackaged", "split_files/vae/mochi_vae.safetensors"),
|
||||||
HuggingFile("Comfy-Org/HunyuanVideo_repackaged", "split_files/vae/hunyuan_video_vae_bf16.safetensors"),
|
HuggingFile("Comfy-Org/HunyuanVideo_repackaged", "split_files/vae/hunyuan_video_vae_bf16.safetensors"),
|
||||||
HuggingFile("comfyanonymous/cosmos_1.0_text_encoder_and_VAE_ComfyUI", "vae/cosmos_cv8x8x8_1.0.safetensors"),
|
HuggingFile("comfyanonymous/cosmos_1.0_text_encoder_and_VAE_ComfyUI", "vae/cosmos_cv8x8x8_1.0.safetensors"),
|
||||||
|
|||||||
@ -755,7 +755,8 @@ class DualCFGGuider:
|
|||||||
"negative": ("CONDITIONING", ),
|
"negative": ("CONDITIONING", ),
|
||||||
"cfg_conds": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
|
"cfg_conds": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
|
||||||
"cfg_cond2_negative": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
|
"cfg_cond2_negative": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
|
||||||
"style": (["regular", "nested"],),
|
}, "optional": {
|
||||||
|
"style": (["regular", "nested"], {"default": "regular"}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ def comfy_background_server(tmp_path_factory) -> Generator[tuple[Configuration,
|
|||||||
|
|
||||||
|
|
||||||
def comfy_background_server_from_config(configuration):
|
def comfy_background_server_from_config(configuration):
|
||||||
server_process = multiprocessing.Process(target=run_server, args=(configuration,))
|
server_process = multiprocessing.get_context('spawn').Process(target=run_server, args=(configuration,))
|
||||||
server_process.start()
|
server_process.start()
|
||||||
# wait for http url to be ready
|
# wait for http url to be ready
|
||||||
success = False
|
success = False
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user