Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,24 +16,6 @@ ip_ckpt = hf_hub_download(repo_id="CiaraRowles/stylecodes", filename="stylecodes
|
|
16 |
|
17 |
device = "cuda"
|
18 |
|
19 |
-
noise_scheduler = DDIMScheduler(
|
20 |
-
num_train_timesteps=1000,
|
21 |
-
beta_start=0.00085,
|
22 |
-
beta_end=0.012,
|
23 |
-
beta_schedule="scaled_linear",
|
24 |
-
clip_sample=False,
|
25 |
-
set_alpha_to_one=False,
|
26 |
-
steps_offset=1,
|
27 |
-
)
|
28 |
-
vae = AutoencoderKL.from_pretrained(vae_model_path).to(dtype=torch.float16)
|
29 |
-
pipe = StableDiffusionPipelineCFG.from_pretrained(
|
30 |
-
base_model_path,
|
31 |
-
scheduler=noise_scheduler,
|
32 |
-
vae=vae,
|
33 |
-
torch_dtype=torch.float16,
|
34 |
-
feature_extractor=safety_feature_extractor,
|
35 |
-
safety_checker=safety_checker
|
36 |
-
).to(device)
|
37 |
|
38 |
|
39 |
cv2.setNumThreads(1)
|
|
|
16 |
|
17 |
device = "cuda"
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
|
21 |
cv2.setNumThreads(1)
|