Mark-Lasfar commited on
Commit
c8c5f4b
·
1 Parent(s): 6c82767

endpoints.py generation.py

Browse files
Files changed (1) hide show
  1. utils/generation.py +12 -12
utils/generation.py CHANGED
@@ -41,18 +41,18 @@ ROUTER_API_URL = os.getenv("ROUTER_API_URL", "https://router.huggingface.co")
41
  API_ENDPOINT = os.getenv("API_ENDPOINT", "https://router.huggingface.co/v1")
42
  FALLBACK_API_ENDPOINT = os.getenv("FALLBACK_API_ENDPOINT", "https://api-inference.huggingface.co/v1")
43
 
44
- # تحميل نموذج FLUX.1-dev مسبقًا إذا لزم الأمر
45
- model_path = None
46
- try:
47
- model_path = snapshot_download(
48
- repo_id="black-forest-labs/FLUX.1-dev",
49
- repo_type="model",
50
- ignore_patterns=["*.md", "*..gitattributes"],
51
- local_dir="FLUX.1-dev",
52
- )
53
- except Exception as e:
54
- logger.error(f"Failed to download FLUX.1-dev: {e}")
55
- model_path = None
56
 
57
  # تعطيل PROVIDER_ENDPOINTS لأننا بنستخدم Hugging Face فقط
58
  PROVIDER_ENDPOINTS = {
 
41
  API_ENDPOINT = os.getenv("API_ENDPOINT", "https://router.huggingface.co/v1")
42
  FALLBACK_API_ENDPOINT = os.getenv("FALLBACK_API_ENDPOINT", "https://api-inference.huggingface.co/v1")
43
 
44
+ # # تحميل نموذج FLUX.1-dev مسبقًا إذا لزم الأمر
45
+ # model_path = None
46
+ # try:
47
+ # model_path = snapshot_download(
48
+ # repo_id="black-forest-labs/FLUX.1-dev",
49
+ # repo_type="model",
50
+ # ignore_patterns=["*.md", "*..gitattributes"],
51
+ # local_dir="FLUX.1-dev",
52
+ # )
53
+ # except Exception as e:
54
+ # logger.error(f"Failed to download FLUX.1-dev: {e}")
55
+ # model_path = None
56
 
57
  # تعطيل PROVIDER_ENDPOINTS لأننا بنستخدم Hugging Face فقط
58
  PROVIDER_ENDPOINTS = {