Any-to-Any
Transformers
Diffusers
Safetensors
text-to-image
image-editing
image-understanding
vision-language
multimodal
autoregressive
unified-model
Instructions to use Skywork/UniPic2-Metaquery-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Skywork/UniPic2-Metaquery-9B with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Skywork/UniPic2-Metaquery-9B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -80,7 +80,7 @@ from transformers import Qwen2_5_VLForConditionalGeneration, Qwen2_5_VLProcessor
|
|
| 80 |
from diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
|
| 81 |
|
| 82 |
# Load model components
|
| 83 |
-
pretrained_model_name_or_path = "/
|
| 84 |
|
| 85 |
transformer = SD3Transformer2DKontextModel.from_pretrained(
|
| 86 |
pretrained_model_name_or_path, subfolder="transformer", torch_dtype=torch.bfloat16).cuda()
|
|
@@ -114,7 +114,7 @@ pipeline = StableDiffusion3KontextPipeline(
|
|
| 114 |
|
| 115 |
# Prepare prompts
|
| 116 |
prompt = 'a pig with wings and a top hat flying over a happy futuristic scifi city'
|
| 117 |
-
negative_prompt = ''
|
| 118 |
|
| 119 |
messages = [[{"role": "user", "content": [{"type": "text", "text": f'Generate an image: {txt}'}]}]
|
| 120 |
for txt in [prompt, negative_prompt]]
|
|
|
|
| 80 |
from diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
|
| 81 |
|
| 82 |
# Load model components
|
| 83 |
+
pretrained_model_name_or_path = "Skywork/UniPic2-Metaquery-9B"
|
| 84 |
|
| 85 |
transformer = SD3Transformer2DKontextModel.from_pretrained(
|
| 86 |
pretrained_model_name_or_path, subfolder="transformer", torch_dtype=torch.bfloat16).cuda()
|
|
|
|
| 114 |
|
| 115 |
# Prepare prompts
|
| 116 |
prompt = 'a pig with wings and a top hat flying over a happy futuristic scifi city'
|
| 117 |
+
negative_prompt = 'blurry, low quality, low resolution, distorted, deformed, broken content, missing parts, damaged details, artifacts, glitch, noise, pixelated, grainy, compression artifacts, bad composition, wrong proportion, incomplete editing, unfinished, unedited areas.'
|
| 118 |
|
| 119 |
messages = [[{"role": "user", "content": [{"type": "text", "text": f'Generate an image: {txt}'}]}]
|
| 120 |
for txt in [prompt, negative_prompt]]
|