This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/.gitignore b/.gitignore | |
| index 70660c5..6b51c8e 100644 | |
| --- a/.gitignore | |
| +++ b/.gitignore | |
| @@ -30,3 +30,6 @@ notification.mp3 | |
| .vscode | |
| /extensions | |
| +cache | |
| +gfpgan/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler | |
| import torch | |
| def main(): | |
| #//////////////////////////////////////////// | |
| seed = 42 | |
| model = "runwayml/stable-diffusion-v1-5" | |
| #//////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler | |
| import torch | |
| def main(): | |
| #//////////////////////////////////////////// | |
| seed = 42 | |
| model = "Norod78/sd-simpsons-model" | |
| #//////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import torch | |
| from PIL import Image | |
| from io import BytesIO | |
| from diffusers import StableDiffusionImg2ImgPipeline, DPMSolverMultistepScheduler | |
| def main(): | |
| #//////////////////////////////////////////// | |
| seed = 42 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import requests | |
| from PIL import Image | |
| from diffusers import StableDiffusionDepth2ImgPipeline | |
| def main(): | |
| device = "cuda" if torch.cuda.is_available() else "cpu" | |
| dtype = torch.float16 if device == "cuda" else torch.float32 | |
| pipe = StableDiffusionDepth2ImgPipeline.from_pretrained( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from transformers import AutoTokenizer | |
| tokenizer_heb = AutoTokenizer.from_pretrained("Norod78/hebrew-gpt_neo-small") | |
| tokenizer_eng = AutoTokenizer.from_pretrained("gpt2") | |
| prompt_text="שלום" | |
| prompt_length = len(prompt_text) | |
| encoded_prompt_heb = tokenizer_heb.encode(prompt_text, add_special_tokens=False, return_tensors="pt") | |
| num_of_tokenz_heb = encoded_prompt_heb.size()[-1] | |
| print(f"Hebrew tokenizer: Tokens = {num_of_tokenz_heb} length = {prompt_length}") #Hebrew tokenizer: Tokens = 1 length = 4 | |
| encoded_prompt_eng = tokenizer_eng.encode(prompt_text, add_special_tokens=False, return_tensors="pt") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler | |
| import torch | |
| #//////////////////////////////////////////////////////////////// | |
| guidance_scale=8.0 | |
| steps=40 | |
| width=512 | |
| height=512 |