Spaces:
Sleeping
Sleeping
JingyeChen22
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def parse_args():
|
|
78 |
parser.add_argument(
|
79 |
"--pretrained_model_name_or_path",
|
80 |
type=str,
|
81 |
-
default='
|
82 |
help="Path to pretrained model or model identifier from huggingface.co/models. Please do not modify this.",
|
83 |
)
|
84 |
parser.add_argument(
|
@@ -361,20 +361,20 @@ if accelerator.is_main_process:
|
|
361 |
|
362 |
# Load scheduler, tokenizer and models.
|
363 |
tokenizer15 = CLIPTokenizer.from_pretrained(
|
364 |
-
'
|
365 |
)
|
366 |
tokenizer21 = CLIPTokenizer.from_pretrained(
|
367 |
'stabilityai/stable-diffusion-2-1', subfolder="tokenizer", revision=args.revision
|
368 |
)
|
369 |
|
370 |
text_encoder15 = CLIPTextModel.from_pretrained(
|
371 |
-
'
|
372 |
)
|
373 |
text_encoder21 = CLIPTextModel.from_pretrained(
|
374 |
'stabilityai/stable-diffusion-2-1', subfolder="text_encoder", revision=args.revision
|
375 |
)
|
376 |
|
377 |
-
vae15 = AutoencoderKL.from_pretrained('
|
378 |
unet15 = UNet2DConditionModel.from_pretrained(
|
379 |
'./textdiffuser-ckpt/diffusion_backbone_1.5', subfolder="unet", revision=None
|
380 |
).cuda()
|
@@ -384,7 +384,7 @@ unet21 = UNet2DConditionModel.from_pretrained(
|
|
384 |
'./textdiffuser-ckpt/diffusion_backbone_2.1', subfolder="unet", revision=None
|
385 |
).cuda()
|
386 |
|
387 |
-
scheduler15 = DDPMScheduler.from_pretrained('
|
388 |
scheduler21 = DDPMScheduler.from_pretrained('stabilityai/stable-diffusion-2-1', subfolder="scheduler")
|
389 |
|
390 |
|
|
|
78 |
parser.add_argument(
|
79 |
"--pretrained_model_name_or_path",
|
80 |
type=str,
|
81 |
+
default='stable-diffusion-v1-5/stable-diffusion-v1-5', # no need to modify this
|
82 |
help="Path to pretrained model or model identifier from huggingface.co/models. Please do not modify this.",
|
83 |
)
|
84 |
parser.add_argument(
|
|
|
361 |
|
362 |
# Load scheduler, tokenizer and models.
|
363 |
tokenizer15 = CLIPTokenizer.from_pretrained(
|
364 |
+
'stable-diffusion-v1-5/stable-diffusion-v1-5', subfolder="tokenizer", revision=args.revision
|
365 |
)
|
366 |
tokenizer21 = CLIPTokenizer.from_pretrained(
|
367 |
'stabilityai/stable-diffusion-2-1', subfolder="tokenizer", revision=args.revision
|
368 |
)
|
369 |
|
370 |
text_encoder15 = CLIPTextModel.from_pretrained(
|
371 |
+
'stable-diffusion-v1-5/stable-diffusion-v1-5', subfolder="text_encoder", revision=args.revision
|
372 |
)
|
373 |
text_encoder21 = CLIPTextModel.from_pretrained(
|
374 |
'stabilityai/stable-diffusion-2-1', subfolder="text_encoder", revision=args.revision
|
375 |
)
|
376 |
|
377 |
+
vae15 = AutoencoderKL.from_pretrained('stable-diffusion-v1-5/stable-diffusion-v1-5', subfolder="vae", revision=args.revision).cuda()
|
378 |
unet15 = UNet2DConditionModel.from_pretrained(
|
379 |
'./textdiffuser-ckpt/diffusion_backbone_1.5', subfolder="unet", revision=None
|
380 |
).cuda()
|
|
|
384 |
'./textdiffuser-ckpt/diffusion_backbone_2.1', subfolder="unet", revision=None
|
385 |
).cuda()
|
386 |
|
387 |
+
scheduler15 = DDPMScheduler.from_pretrained('stable-diffusion-v1-5/stable-diffusion-v1-5', subfolder="scheduler")
|
388 |
scheduler21 = DDPMScheduler.from_pretrained('stabilityai/stable-diffusion-2-1', subfolder="scheduler")
|
389 |
|
390 |
|