Upload app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ args.device = "cuda"
|
|
76 |
|
77 |
base_path = 'feishen29/IMAGDressing-v1'
|
78 |
|
79 |
-
|
80 |
vae = AutoencoderKL.from_pretrained('./ckpt/sd-vae-ft-mse/').to(dtype=torch.float16, device=args.device)
|
81 |
tokenizer = CLIPTokenizer.from_pretrained("./ckpt/tokenizer")
|
82 |
text_encoder = CLIPTextModel.from_pretrained("./ckpt/text_encoder").to(dtype=torch.float16, device=args.device)
|
@@ -259,6 +259,7 @@ def dress_process(garm_img, face_img, pose_img, prompt, cloth_guidance_scale, ca
|
|
259 |
scheduler=noise_scheduler,
|
260 |
safety_checker=StableDiffusionSafetyChecker,
|
261 |
feature_extractor=CLIPImageProcessor)
|
|
|
262 |
output = pipe(
|
263 |
ref_image=vae_clothes,
|
264 |
prompt=prompt,
|
|
|
76 |
|
77 |
base_path = 'feishen29/IMAGDressing-v1'
|
78 |
|
79 |
+
|
80 |
vae = AutoencoderKL.from_pretrained('./ckpt/sd-vae-ft-mse/').to(dtype=torch.float16, device=args.device)
|
81 |
tokenizer = CLIPTokenizer.from_pretrained("./ckpt/tokenizer")
|
82 |
text_encoder = CLIPTextModel.from_pretrained("./ckpt/text_encoder").to(dtype=torch.float16, device=args.device)
|
|
|
259 |
scheduler=noise_scheduler,
|
260 |
safety_checker=StableDiffusionSafetyChecker,
|
261 |
feature_extractor=CLIPImageProcessor)
|
262 |
+
generator = torch.Generator(device).manual_seed(seed) if seed is not None else None
|
263 |
output = pipe(
|
264 |
ref_image=vae_clothes,
|
265 |
prompt=prompt,
|