cookey39 commited on
Commit
ba7137c
1 Parent(s): ebf1f42

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -68,14 +68,14 @@ pipeline.load_lora_weights('cookey39/teratera', weight_name='pytorch_lora_weight
68
  embedding_path = hf_hub_download(repo_id='cookey39/teratera', filename='teratera_emb.safetensors', repo_type="model")
69
  state_dict = load_file(embedding_path)
70
  # load embeddings of text_encoder 1 (CLIP ViT-L/14)
71
- pipe.load_textual_inversion(state_dict["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder, tokenizer=pipe.tokenizer)
72
  # load embeddings of text_encoder 2 (CLIP ViT-G/14)
73
- pipe.load_textual_inversion(state_dict["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder_2, tokenizer=pipe.tokenizer_2)
74
 
75
  instance_token = "<s0><s1>"
76
  prompt = f"a {instance_token}full-length phoor portrait,Vibrant, solo, 1girl, smile, long hair, hair between eyes, multicolored eyes, hooded jacket, open jacket, shirt, long sleeves, ribbon, best quality, perfect anatomy, highres, absurdres{instance_token} "
77
  negative_prompt = "bad_prompt_version2, (worst quality, low quality:1.4), realistic, lip, nose, tooth, rouge, lipstick, eyeshadow, abs, muscular, rib, (depth of field, bokeh, blurry:1.4), greyscale"
78
- image = pipe(prompt=prompt, negative_prompt = negative_prompt, num_inference_steps=100, cross_attention_kwargs={"scale": 1.0},width = 960, height=1280).images[0]
79
  image.save("./save.png")
80
  ```
81
 
 
68
  embedding_path = hf_hub_download(repo_id='cookey39/teratera', filename='teratera_emb.safetensors', repo_type="model")
69
  state_dict = load_file(embedding_path)
70
  # load embeddings of text_encoder 1 (CLIP ViT-L/14)
71
+ pipeline.load_textual_inversion(state_dict["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder, tokenizer=pipeline.tokenizer)
72
  # load embeddings of text_encoder 2 (CLIP ViT-G/14)
73
+ pipeline.load_textual_inversion(state_dict["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder_2, tokenizer=pipeline.tokenizer_2)
74
 
75
  instance_token = "<s0><s1>"
76
  prompt = f"a {instance_token}full-length phoor portrait,Vibrant, solo, 1girl, smile, long hair, hair between eyes, multicolored eyes, hooded jacket, open jacket, shirt, long sleeves, ribbon, best quality, perfect anatomy, highres, absurdres{instance_token} "
77
  negative_prompt = "bad_prompt_version2, (worst quality, low quality:1.4), realistic, lip, nose, tooth, rouge, lipstick, eyeshadow, abs, muscular, rib, (depth of field, bokeh, blurry:1.4), greyscale"
78
+ image = pipeline(prompt=prompt, negative_prompt = negative_prompt, num_inference_steps=100, cross_attention_kwargs={"scale": 1.0},width = 960, height=1280).images[0]
79
  image.save("./save.png")
80
  ```
81