Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from diffusers import StableDiffusion3Pipeline
|
|
|
|
|
|
|
|
|
4 |
|
5 |
# 加载模型并配置
|
6 |
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-large", torch_dtype=torch.bfloat16)
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from diffusers import StableDiffusion3Pipeline
|
4 |
+
import os
|
5 |
+
hf_token = os.environ.get("HF_TOKEN")
|
6 |
+
login(token=hf_token)
|
7 |
+
|
8 |
|
9 |
# 加载模型并配置
|
10 |
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-large", torch_dtype=torch.bfloat16)
|