Instructions to use NYUAD-ComNets/Asian_Male_Profession_Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use NYUAD-ComNets/Asian_Male_Profession_Model with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("NYUAD-ComNets/Asian_Male_Profession_Model") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Commit ·
717bfb5
1
Parent(s): f34442d
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,9 +53,6 @@ for i,j in zip(models,adapters):
|
|
| 53 |
pipeline.load_lora_weights(i, weight_name="pytorch_lora_weights.safetensors",adapter_name=j)
|
| 54 |
|
| 55 |
|
| 56 |
-
prof='doctor'
|
| 57 |
-
|
| 58 |
-
|
| 59 |
pipeline.set_adapters(random.choice(adapters))
|
| 60 |
|
| 61 |
|
|
@@ -65,7 +62,7 @@ compel = Compel(tokenizer=[pipeline.tokenizer, pipeline.tokenizer_2] ,
|
|
| 65 |
requires_pooled=[False, True],truncate_long_prompts=False)
|
| 66 |
|
| 67 |
|
| 68 |
-
conditioning, pooled = compel("a photo of a
|
| 69 |
|
| 70 |
negative_conditioning, negative_pooled = compel(negative_prompt)
|
| 71 |
[conditioning, negative_conditioning] = compel.pad_conditioning_tensors_to_same_length([conditioning, negative_conditioning])
|
|
@@ -95,7 +92,8 @@ image.save('/../../x.jpg')
|
|
| 95 |
|
| 96 |
NYUAD-ComNets/Asian_Male_Profession dataset was used to fine-tune stabilityai/stable-diffusion-xl-base-1.0
|
| 97 |
|
| 98 |
-
|
|
|
|
| 99 |
|
| 100 |
# Configurations
|
| 101 |
|
|
|
|
| 53 |
pipeline.load_lora_weights(i, weight_name="pytorch_lora_weights.safetensors",adapter_name=j)
|
| 54 |
|
| 55 |
|
|
|
|
|
|
|
|
|
|
| 56 |
pipeline.set_adapters(random.choice(adapters))
|
| 57 |
|
| 58 |
|
|
|
|
| 62 |
requires_pooled=[False, True],truncate_long_prompts=False)
|
| 63 |
|
| 64 |
|
| 65 |
+
conditioning, pooled = compel("a photo of a doctor, looking at the camera, closeup headshot facing forward, ultra quality, sharp focus")
|
| 66 |
|
| 67 |
negative_conditioning, negative_pooled = compel(negative_prompt)
|
| 68 |
[conditioning, negative_conditioning] = compel.pad_conditioning_tensors_to_same_length([conditioning, negative_conditioning])
|
|
|
|
| 92 |
|
| 93 |
NYUAD-ComNets/Asian_Male_Profession dataset was used to fine-tune stabilityai/stable-diffusion-xl-base-1.0
|
| 94 |
|
| 95 |
+
profession list =['pilot','doctor','nurse','pharmacist','dietitian','professor','teacher','mathematics scientist','computer engineer','programmer','tailor','cleaner',
|
| 96 |
+
'soldier','security guard','lawyer','manager','accountant','secretary','singer','journalist','youtuber','tiktoker','fashion model','chef','sushi chef']
|
| 97 |
|
| 98 |
# Configurations
|
| 99 |
|