Загрузка...

Kawaii Girl Dancing [Coded with: Warp Fusion A.I., Stable Diffusion A.I., Hugging Face]

Created with:

1. https:// huggingface.co/models
2. https:// github.com/Sxela/WarpFusion
3. https:// stability.ai/news/introducing-stable-diffusion-3-5
4. https: //colab.research.google.com/notebooks/snippets/importing_libraries.ipynb

Description:

Stable Diffusion AI Models

stabilityai/stable-diffusion-3.5-medium · Hugging Face

https: //huggingface.co/stabilityai/stable-diffusion-3.5-medium

Stable Diffusion AI models are advanced text-to-image generative models developed by Stability AI. These models use a Multimodal Diffusion Transformer (MMDiT-X) architecture to generate high-quality images based on text prompts. The latest version, Stable Diffusion 3.5 Medium, offers significant improvements in image quality, typography, complex prompt understanding, and resource efficiency.

Key Features and Enhancements

MMDiT-X Architecture

The MMDiT-X architecture introduces self-attention modules in the first 13 layers of the transformer, enhancing multi-resolution generation and overall image coherence. This architecture uses three fixed, pretrained text encoders: OpenCLIP-ViT/G, CLIP-ViT/L, and T5-xxl.

QK Normalization

QK normalization is implemented to improve training stability. This technique helps in maintaining the consistency and quality of the generated images throughout the training process.

Mixed-Resolution Training

The model undergoes progressive training stages with resolutions ranging from 256 to 1440. This mixed-scale image training boosts multi-resolution generation performance and adaptability across various text-to-image tasks.

Text Encoders

The model uses multiple text encoders, including OpenCLIP-ViT/G, CLIP-ViT/L, and T5-xxl, with context lengths of 77 and 256 tokens at different stages of training. This allows the model to handle complex and long prompts effectively.

Usage and Implementation

Using with Diffusers

To use the Stable Diffusion 3.5 Medium model with the diffusers library, you can follow these steps:

Install the latest version of the diffusers library:

pip install -U diffusers
Copy
Import the necessary modules and load the model:

import torch
from diffusers import StableDiffusion3Pipeline

pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.bfloat16)
pipe = pipe.to("cuda")

image = pipe(
"A capybara holding a sign that reads Hello World",
num_inference_steps=40,
guidance_scale=4.5,
).images[0]
image.save("capybara.png")
Copy
Quantizing the Model

To reduce VRAM usage and fit the model on GPUs with limited VRAM, you can quantize the model using the bitsandbytes library: bash pip install bitsandbytes

```python
from diffusers import BitsAndBytesConfig, SD3Transformer2DModel, StableDiffusion3Pipeline
import torch

model_id = "stabilityai/stable-diffusion-3.5-medium"

nf4_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16
)
model_nf4 = SD3Transformer2DModel.from_pretrained(
model_id,
subfolder="transformer",
quantization_config=nf4_config,
torch_dtype=torch.bfloat16
)

pipeline = StableDiffusion3Pipeline.from_pretrained(
model_id,
transformer=model_nf4,
torch_dtype=torch.bfloat16
)
pipeline.enable_model_cpu_offload()

prompt = "A whimsical and creative image depicting a hybrid creature that is a mix of a waffle and a hippopotamus, basking in a river of melted butter amidst a breakfast-themed landscape..."
image = pipeline(
prompt=prompt,
num_inference_steps=40,
guidance_scale=4.5,
max_sequence_length=512,
).images[0]
image.save("whimsical.png")
```
Copy
Intended Uses and Limitations

Intended Uses

The model is designed for generating artworks, educational or creative tools, and research on generative models. It is suitable for applications in design and other artistic processes.

Limitations

The model is not trained to generate factual or true representations of people or events. It may produce artifacts when handling long prompts, especially when T5 tokens exceed 256.

Safety and Integrity

Stability AI implements safety measures throughout the development of their models to reduce the risk of harmful content and misuse. Developers are encouraged to conduct their own testing and apply additional mitigations based on their specific use cases.

For more details, you can visit the Hugging Face page for Stable Diffusion 3.5 Medium.

#Kawaii | #Girl | #Animation | #A.I. | #AI | #ArtificialIntelligence | #Artificial | #Intelligence | #Code | #Kotlin | #Koog | #Warpfusion | #Stablediffusion | #Googlecolab | #Ktor | #Python | #LLM | #Machine | #Learning | #Agentics | #Warp | #Fusion | #Stable | #Diffusion | #Hugging | #Face | #Android | #Studio | #Sxela | #Models

Видео Kawaii Girl Dancing [Coded with: Warp Fusion A.I., Stable Diffusion A.I., Hugging Face] канала Kitsune Kairosfusion
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять