Skip to content

Commit 1904a01

Browse files
author
Yuwei Guo
committed
v2 inference
1 parent 1089219 commit 1904a01

File tree

4 files changed

+53
-3
lines changed

4 files changed

+53
-3
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
unet_additional_kwargs:
2+
use_inflated_groupnorm: true
3+
unet_use_cross_frame_attention: false
4+
unet_use_temporal_attention: false
5+
use_motion_module: true
6+
motion_module_resolutions:
7+
- 1
8+
- 2
9+
- 4
10+
- 8
11+
motion_module_mid_block: true
12+
motion_module_decoder_only: false
13+
motion_module_type: Vanilla
14+
motion_module_kwargs:
15+
num_attention_heads: 8
16+
num_transformer_block: 1
17+
attention_block_types:
18+
- Temporal_Self
19+
- Temporal_Self
20+
temporal_position_encoding: true
21+
temporal_position_encoding_max_len: 32
22+
temporal_attention_dim_div: 1
23+
24+
noise_scheduler_kwargs:
25+
beta_start: 0.00085
26+
beta_end: 0.012
27+
beta_schedule: "linear"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
RealisticVision:
2+
base: ""
3+
path: "models/DreamBooth_LoRA/realisticVisionV20_v20.safetensors"
4+
5+
inference_config: "configs/inference/inference-v2.yaml"
6+
motion_module:
7+
- "models/Motion_Module/mm_sd_v15_v2.ckpt"
8+
9+
seed: [13100322578370451493, 14752961627088720670, 9329399085567825781, 16987697414827649302]
10+
steps: 25
11+
guidance_scale: 7.5
12+
13+
prompt:
14+
- "b&w photo of 42 y.o man in black clothes, bald, face, half body, body, high detailed skin, skin pores, coastline, overcast weather, wind, waves, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3"
15+
- "close up photo of a rabbit, forest, haze, halation, bloom, dramatic atmosphere, centred, rule of thirds, 200mm 1.4f macro shot"
16+
- "photo of coastline, rocks, storm weather, wind, waves, lightning, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3"
17+
- "night, b&w photo of old house, post apocalypse, forest, storm weather, wind, rocks, 8k uhd, dslr, soft lighting, high quality, film grain"
18+
19+
n_prompt:
20+
- "semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck"
21+
- "semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck"
22+
- "blur, haze, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers, deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation"
23+
- "blur, haze, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, art, mutated hands and fingers, deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation"

scripts/animate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def main(args):
3434
time_str = datetime.datetime.now().strftime("%Y-%m-%dT%H-%M-%S")
3535
savedir = f"samples/{Path(args.config).stem}-{time_str}"
3636
os.makedirs(savedir)
37-
inference_config = OmegaConf.load(args.inference_config)
3837

3938
config = OmegaConf.load(args.config)
4039
samples = []
@@ -45,7 +44,8 @@ def main(args):
4544
motion_modules = model_config.motion_module
4645
motion_modules = [motion_modules] if isinstance(motion_modules, str) else list(motion_modules)
4746
for motion_module in motion_modules:
48-
47+
inference_config = OmegaConf.load(model_config.get("inference_config", args.inference_config))
48+
4949
### >>> create validation pipeline >>> ###
5050
tokenizer = CLIPTokenizer.from_pretrained(args.pretrained_model_path, subfolder="tokenizer")
5151
text_encoder = CLIPTextModel.from_pretrained(args.pretrained_model_path, subfolder="text_encoder")
@@ -148,7 +148,7 @@ def main(args):
148148
if __name__ == "__main__":
149149
parser = argparse.ArgumentParser()
150150
parser.add_argument("--pretrained_model_path", type=str, default="models/StableDiffusion/stable-diffusion-v1-5",)
151-
parser.add_argument("--inference_config", type=str, default="configs/inference/inference.yaml")
151+
parser.add_argument("--inference_config", type=str, default="configs/inference/inference-v1.yaml")
152152
parser.add_argument("--config", type=str, required=True)
153153

154154
parser.add_argument("--L", type=int, default=16 )

0 commit comments

Comments
 (0)