Update app.py
Browse files
app.py
CHANGED
@@ -247,11 +247,11 @@ MAX_IMAGE_SIZE = 2048
|
|
247 |
|
248 |
if torch.cuda.is_available():
|
249 |
#vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
250 |
-
token = os.environ.get("HF_TOKEN") # 从环境变量读取令牌
|
251 |
model_path = hf_hub_download(
|
252 |
-
repo_id="Menyu/
|
253 |
-
filename="
|
254 |
-
use_auth_token=token
|
255 |
)
|
256 |
pipe = StableDiffusionXLPipeline.from_single_file(
|
257 |
model_path,
|
@@ -326,9 +326,9 @@ def infer(
|
|
326 |
"height": height,
|
327 |
"guidance_scale": guidance_scale,
|
328 |
"num_inference_steps": num_inference_steps,
|
329 |
-
"model": "
|
330 |
"use_resolution_binning": use_resolution_binning,
|
331 |
-
"PreUrl": "https://huggingface.co/spaces/Menyu/
|
332 |
}
|
333 |
|
334 |
# Add metadata to the image
|
|
|
247 |
|
248 |
if torch.cuda.is_available():
|
249 |
#vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
250 |
+
#token = os.environ.get("HF_TOKEN") # 从环境变量读取令牌
|
251 |
model_path = hf_hub_download(
|
252 |
+
repo_id="Menyu/ModelFile", # 模型仓库名称(非完整URL)
|
253 |
+
filename="naixlMmmmix_v50.safetensors" #,
|
254 |
+
#use_auth_token=token
|
255 |
)
|
256 |
pipe = StableDiffusionXLPipeline.from_single_file(
|
257 |
model_path,
|
|
|
326 |
"height": height,
|
327 |
"guidance_scale": guidance_scale,
|
328 |
"num_inference_steps": num_inference_steps,
|
329 |
+
"model": "naixlMmmmix_v50",
|
330 |
"use_resolution_binning": use_resolution_binning,
|
331 |
+
"PreUrl": "https://huggingface.co/spaces/Menyu/NaixlMix"
|
332 |
}
|
333 |
|
334 |
# Add metadata to the image
|