This file contains 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 StableDiffusionXLPipeline | |
from sd_embed.embedding_funcs import get_weighted_text_embeddings_sdxl | |
from sd_embed.embedding_funcs import get_weighted_text_embeddings_sdxl_2p | |
from sd_embed.embedding_funcs import group_tokens_and_weights | |
from sd_embed.prompt_parser import parse_prompt_attention | |
from diffusers import DiffusionPipeline,EulerAncestralDiscreteScheduler | |
from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer | |
from diffusers.utils import make_image_grid | |
import torch, gc |
This file contains 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
azureuser@aiartlab-1:~$ python3 -m pip freeze | |
absl-py==2.1.0 | |
accelerate==0.25.0 | |
aiohttp==3.9.5 | |
aiosignal==1.3.1 | |
altair==4.2.2 | |
async-timeout==4.0.3 | |
attrs==21.2.0 | |
Automat==20.2.0 | |
Babel==2.8.0 |
This file contains 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 DiffusionPipeline,EulerAncestralDiscreteScheduler | |
from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer | |
import torch | |
MODEL_PATH = "models/colorfulxl" | |
pipe = DiffusionPipeline.from_pretrained( | |
MODEL_PATH, | |
text_encoder=None, tokenizer=None, | |
text_encoder_2=None, tokenizer_2=None, | |
torch_dtype=torch.float16, |
This file contains 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 StableDiffusionXLPipeline | |
from sd_embed.embedding_funcs import get_weighted_text_embeddings_sdxl | |
from sd_embed.embedding_funcs import get_weighted_text_embeddings_sdxl_2p | |
from sd_embed.prompt_parser import parse_prompt_attention | |
from diffusers import DiffusionPipeline,EulerAncestralDiscreteScheduler | |
from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer | |
from diffusers.utils import make_image_grid | |
import torch | |
MODEL_PATH = "models/colorfulxl" |
This file contains 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 DiffusionPipeline,EulerAncestralDiscreteScheduler | |
from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer | |
import torch | |
MODEL_PATH = "models/colorfulxl" | |
pipe = DiffusionPipeline.from_pretrained( | |
MODEL_PATH, | |
text_encoder=None, tokenizer=None, | |
text_encoder_2=None, tokenizer_2=None, | |
torch_dtype=torch.float16, |
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 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
[{"prompt":"An ancient man is riding in a carriage along a mountain road.","txt":"Venerable man journeys in ancient mountains. Carriage creaks, revealing deep wisdom. Twilight paints dreamlike tableau.","_id":"65b7ba0cfb9aff6d419a368e"}, | |
{"prompt":"Great Wall of China","txt":"Ancient wall, setting sun, breathtaking beauty.","_id":"65b7b89ffb9aff6d419a3688"}, | |
{"prompt":"A resident of the mountains is riding in a carriage along a rocky road","txt":"Mountaineer finds solace in antique carriage, rugged path of rocks, rustic charm, creaking wheels, calm resolve, beautiful mountains, untamed road, orange sunset, approaching night.","_id":"65b7b71ffb9aff6d419a3684"}, | |
{"prompt":"A person in primitive clothing traveling on Earth. Their hands hold simple tools reflecting their primitive wisdom. They stand under a breathtaking sunset, painting the sky in beautiful shades. Mountains in the background and a winding river complete the lush landscape. Ancient creatures can be seen in the distance, seemingly unaware of these |
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 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 cv2 | |
import os | |
import time | |
import mediapipe as mp | |
import numpy as np | |
def extract_faces(image): | |
center_faces = [] | |
BaseOptions = mp.tasks.BaseOptions | |
FaceDetector = mp.tasks.vision.FaceDetector |
NewerOlder