Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,8 @@ torch.backends.cuda.preferred_linalg_library="cusolver"
|
|
33 |
|
34 |
torch.set_float32_matmul_precision("highest")
|
35 |
|
|
|
|
|
36 |
def upload_to_ftp(filename):
|
37 |
try:
|
38 |
transport = paramiko.Transport((FTP_HOST, 22))
|
@@ -54,7 +56,7 @@ checkpoint = "microsoft/Phi-3.5-mini-instruct"
|
|
54 |
vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", torch_dtype=torch.bfloat16, device_map='balanced')
|
55 |
|
56 |
#pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16", torch_dtype=torch.bfloat16, device_map='balanced')
|
57 |
-
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.float32, device_map='balanced')
|
58 |
|
59 |
# pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++")
|
60 |
|
|
|
33 |
|
34 |
torch.set_float32_matmul_precision("highest")
|
35 |
|
36 |
+
hftoken = os.getenv("HF_AUTH_TOKEN")
|
37 |
+
|
38 |
def upload_to_ftp(filename):
|
39 |
try:
|
40 |
transport = paramiko.Transport((FTP_HOST, 22))
|
|
|
56 |
vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", torch_dtype=torch.bfloat16, device_map='balanced')
|
57 |
|
58 |
#pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16", torch_dtype=torch.bfloat16, device_map='balanced')
|
59 |
+
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", token=hftoken, torch_dtype=torch.float32, device_map='balanced')
|
60 |
|
61 |
# pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++")
|
62 |
|