sdiazlor commited on
Commit
743271c
·
1 Parent(s): 7f98ace

update naming

Browse files
.gitattributes CHANGED
@@ -39,10 +39,10 @@ tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
  prompt_upsampler_processor/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
  assets/edits.jpg filter=lfs diff=lfs merge=lfs -text
41
  assets/multi_image.jpg filter=lfs diff=lfs merge=lfs -text
42
- assets/p-h3-image.jpg filter=lfs diff=lfs merge=lfs -text
43
  assets/prompt.jpg filter=lfs diff=lfs merge=lfs -text
44
  assets/resolution_ladder.jpg filter=lfs diff=lfs merge=lfs -text
45
  assets/styles.jpg filter=lfs diff=lfs merge=lfs -text
46
- assets/P-H3-Image-latency.png filter=lfs diff=lfs merge=lfs -text
47
- assets/P-H3-Image-memory.png filter=lfs diff=lfs merge=lfs -text
48
- assets/P-H3-Image-weights.png filter=lfs diff=lfs merge=lfs -text
 
39
  prompt_upsampler_processor/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
  assets/edits.jpg filter=lfs diff=lfs merge=lfs -text
41
  assets/multi_image.jpg filter=lfs diff=lfs merge=lfs -text
42
+ assets/p-image-oss.jpg filter=lfs diff=lfs merge=lfs -text
43
  assets/prompt.jpg filter=lfs diff=lfs merge=lfs -text
44
  assets/resolution_ladder.jpg filter=lfs diff=lfs merge=lfs -text
45
  assets/styles.jpg filter=lfs diff=lfs merge=lfs -text
46
+ assets/P-Image-OSS-latency.png filter=lfs diff=lfs merge=lfs -text
47
+ assets/P-Image-OSS-memory.png filter=lfs diff=lfs merge=lfs -text
48
+ assets/P-Image-OSS-weights.png filter=lfs diff=lfs merge=lfs -text
NOTICE CHANGED
@@ -1,14 +1,14 @@
1
- p-h3-image
2
  Copyright 2026 Pruna AI
3
 
4
  The files in this repository were modified by Pruna AI.
5
 
6
  transformer/, vae/, text_connector/ and text_encoder/
7
- p-h3-image, based on MiniMax-H3 by MiniMax (https://huggingface.co/MiniMaxAI/MiniMax-H3), under the MiniMax H3
8
  Community License Agreement, see LICENSE. The text encoder is also based on Qwen3-VL-4B by the Qwen team
9
  (https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct); its Qwen3-VL-4B parts are under the Apache License 2.0, see
10
  LICENSE-APACHE.
11
 
12
  prompt_upsampler/
13
- The p-h3-image prompt upsampler, based on Qwen3.5-9B by the Qwen team (https://huggingface.co/Qwen/Qwen3.5-9B),
14
  under the Apache License 2.0, see LICENSE-APACHE.
 
1
+ p-image-oss
2
  Copyright 2026 Pruna AI
3
 
4
  The files in this repository were modified by Pruna AI.
5
 
6
  transformer/, vae/, text_connector/ and text_encoder/
7
+ p-image-oss, based on MiniMax-H3 by MiniMax (https://huggingface.co/MiniMaxAI/MiniMax-H3), under the MiniMax H3
8
  Community License Agreement, see LICENSE. The text encoder is also based on Qwen3-VL-4B by the Qwen team
9
  (https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct); its Qwen3-VL-4B parts are under the Apache License 2.0, see
10
  LICENSE-APACHE.
11
 
12
  prompt_upsampler/
13
+ The p-image-oss prompt upsampler, based on Qwen3.5-9B by the Qwen team (https://huggingface.co/Qwen/Qwen3.5-9B),
14
  under the Apache License 2.0, see LICENSE-APACHE.
README.md CHANGED
@@ -21,7 +21,7 @@ tags:
21
  ---
22
  <!-- header start -->
23
  <p align="center">
24
- <img src="assets/p-h3-image.jpg" width="800">
25
  </p>
26
  <!-- header end -->
27
 
@@ -48,7 +48,7 @@ tags:
48
  </p>
49
  <div align="center">
50
 
51
- <h1 style="color: #9334E9;">P-H3-Image</h1>
52
 
53
  <h2>Image generation and editing based on MiniMax-H3</h2>
54
 
@@ -64,10 +64,10 @@ tags:
64
 
65
  </div>
66
 
67
- **P-H3-Image** is an image model for text-to-image generation and image editing, based on
68
  [MiniMax-H3](https://huggingface.co/MiniMaxAI/MiniMax-H3). It renders 8-megapixel images in 8 steps without
69
  classifier-free guidance, edits with up to 8 input images, and comes with a prompt upsampler that turns a one-line
70
- request into the full prompt P-H3-Image renders best. It is strongest at photorealism, film and editorial looks, and
71
  graphic styles with short quoted text.
72
 
73
  This repository holds the [diffusers](https://github.com/huggingface/diffusers) pipeline. For ComfyUI, with int8 and
@@ -97,7 +97,7 @@ pip install -U transformers accelerate torch pillow
97
  import torch
98
  from diffusers import ModularPipeline
99
 
100
- pipe = ModularPipeline.from_pretrained("PrunaAI/P-H3-Image")
101
  pipe.load_components(dtype=torch.bfloat16)
102
  pipe.to("cuda")
103
 
@@ -136,7 +136,7 @@ composed = pipe(
136
  <img src="assets/resolutions.png" width="100%">
137
  </p>
138
 
139
- P-H3-Image works best at **8 MP**. Images at 2 and 4 MP can be good too, but artifacts become more frequent, especially
140
  in faces, hands and small details. For text-to-image, use one of the 8 MP sizes below. The default is 2912 × 2912.
141
 
142
  Edits work best at 4 or 8 MP. Without `height` and `width`, the edit is generated at the size of Picture 1, scaled up to
@@ -178,7 +178,7 @@ resolutions because the noise changes with the image size.*
178
 
179
  ## Prompting
180
 
181
- P-H3-Image is sensitive to prompting and renders full, specific prompts much better than short requests. The pipeline
182
  therefore runs a prompt upsampler, based on Qwen3.5-9B, on every request. It writes a detailed prompt for the aspect
183
  ratio of `height` and `width`, or, for an edit, a brief of what to keep and what to change. The prompt it wrote comes
184
  back as the `prompt` output.
@@ -191,10 +191,10 @@ print(out["prompt"])
191
  To render a prompt as written, remove the step from the blocks.
192
 
193
  ```python
194
- blocks = ModularPipeline.from_pretrained("PrunaAI/P-H3-Image").blocks
195
  blocks.sub_blocks.pop("prompt_upsampler")
196
 
197
- pipe = blocks.init_pipeline("PrunaAI/P-H3-Image")
198
  pipe.load_components(dtype=torch.bfloat16)
199
  pipe.to("cuda")
200
  image = pipe(prompt=prompt, height=3360, width=2496, output="images")[0] # rendered as written
@@ -210,7 +210,7 @@ When you write prompts by hand, four things matter most.
210
  3. **Spell out every word.** Text without its exact words turns into pseudo-text. Put each piece of text in quotes,
211
  keep each string short, say where it sits, and end with "no other text". If you want no text, don't mention signs
212
  or labels at all.
213
- 4. **Leave out hype words.** Stunning, epic, cinematic, vibrant, hyper-detailed, 8k or masterpiece push P-H3-Image
214
  toward a glossy, oversaturated, airbrushed look.
215
 
216
  <p align="center">
@@ -233,7 +233,7 @@ text.
233
  ## Editing
234
 
235
  Pass one image to edit it, or a list of up to 8. Picture 1 is the image to edit, and the others are references the
236
- request can name as Picture 2, Picture 3 and so on. The upsampler writes the edit prompt in the form P-H3-Image edits
237
  best from, so a short request such as "make the pickup truck red" is enough.
238
 
239
  <p align="center">
@@ -241,17 +241,17 @@ best from, so a short request such as "make the pickup truck red" is enough.
241
  </p>
242
 
243
  *The same short request given as typed (middle) and written as an edit prompt that names what to keep (right), the form
244
- the upsampler writes. As typed, P-H3-Image often redraws the whole scene. As an edit prompt, only the requested part
245
  changes.*
246
 
247
- P-H3-Image combines many references at once. Given up to 8 pictures and a one-line request, the upsampler names each
248
- picture and what to take from it, and P-H3-Image composes them into one scene.
249
 
250
  <p align="center">
251
  <img src="assets/multi_image.jpg" width="100%">
252
  </p>
253
 
254
- *Top, eight public-domain portraits and the dinner party P-H3-Image composed from them, from a one-sentence request.
255
  Bottom, eight scientists at a poker table, seven presidents wading through the swamp with an astronaut, and characters
256
  from our own renders in the same swamp.*
257
 
@@ -266,7 +266,7 @@ Edit <Picture 1>. <The change, described as the finished result>. Keep <everythi
266
  - **Describe the result, not the action.** Say how the edited part looks in the finished image, and give new things a
267
  size next to something already there, such as "about the size of the cat's head".
268
  - **Say what stays.** List what must not change, such as faces, poses, the background and the light. Without this
269
- list, P-H3-Image tends to redraw the whole image.
270
  - **Quote new text exactly.** Put new text in quotes and name the text around it that must stay.
271
 
272
  ## Less GPU memory
@@ -281,7 +281,7 @@ from diffusers import ComponentsManager, ModularPipeline
281
  manager = ComponentsManager()
282
  manager.enable_auto_cpu_offload(device="cuda")
283
 
284
- pipe = ModularPipeline.from_pretrained("PrunaAI/P-H3-Image", components_manager=manager)
285
  pipe.load_components(dtype=torch.bfloat16)
286
  image = pipe(prompt=prompt, height=3360, width=2496, output="images")[0]
287
  ```
@@ -308,11 +308,11 @@ The 8 steps run over the checkpoint's own sampling grid. Pass `sigmas` to use an
308
  longer passages sometimes get single letters wrong. Short quoted strings render well.
309
  - **Lower resolutions show more artifacts.** At 2 and 4 MP, faces, hands and small details break more often than at
310
  8 MP.
311
- - **Single images only.** P-H3-Image does not generate video or audio.
312
 
313
  ## License
314
 
315
- P-H3-Image is based on MiniMax-H3 and released under the [MiniMax H3 Community License](LICENSE). Please read it before
316
  use. Among other terms, it excludes the European Union, the United Kingdom, the Republic of Korea and the United States
317
  unless you have a separate license from MiniMax, and products built on it must show "Powered by MiniMax H3". The text
318
  encoder's Qwen3-VL-4B parts and the prompt upsampler, based on Qwen3.5-9B, are under the
 
21
  ---
22
  <!-- header start -->
23
  <p align="center">
24
+ <img src="assets/p-image-oss.jpg" width="800">
25
  </p>
26
  <!-- header end -->
27
 
 
48
  </p>
49
  <div align="center">
50
 
51
+ <h1 style="color: #9334E9;">P-Image-OSS</h1>
52
 
53
  <h2>Image generation and editing based on MiniMax-H3</h2>
54
 
 
64
 
65
  </div>
66
 
67
+ **P-Image-OSS** is an image model for text-to-image generation and image editing, based on
68
  [MiniMax-H3](https://huggingface.co/MiniMaxAI/MiniMax-H3). It renders 8-megapixel images in 8 steps without
69
  classifier-free guidance, edits with up to 8 input images, and comes with a prompt upsampler that turns a one-line
70
+ request into the full prompt P-Image-OSS renders best. It is strongest at photorealism, film and editorial looks, and
71
  graphic styles with short quoted text.
72
 
73
  This repository holds the [diffusers](https://github.com/huggingface/diffusers) pipeline. For ComfyUI, with int8 and
 
97
  import torch
98
  from diffusers import ModularPipeline
99
 
100
+ pipe = ModularPipeline.from_pretrained("PrunaAI/P-Image-OSS")
101
  pipe.load_components(dtype=torch.bfloat16)
102
  pipe.to("cuda")
103
 
 
136
  <img src="assets/resolutions.png" width="100%">
137
  </p>
138
 
139
+ P-Image-OSS works best at **8 MP**. Images at 2 and 4 MP can be good too, but artifacts become more frequent, especially
140
  in faces, hands and small details. For text-to-image, use one of the 8 MP sizes below. The default is 2912 × 2912.
141
 
142
  Edits work best at 4 or 8 MP. Without `height` and `width`, the edit is generated at the size of Picture 1, scaled up to
 
178
 
179
  ## Prompting
180
 
181
+ P-Image-OSS is sensitive to prompting and renders full, specific prompts much better than short requests. The pipeline
182
  therefore runs a prompt upsampler, based on Qwen3.5-9B, on every request. It writes a detailed prompt for the aspect
183
  ratio of `height` and `width`, or, for an edit, a brief of what to keep and what to change. The prompt it wrote comes
184
  back as the `prompt` output.
 
191
  To render a prompt as written, remove the step from the blocks.
192
 
193
  ```python
194
+ blocks = ModularPipeline.from_pretrained("PrunaAI/P-Image-OSS").blocks
195
  blocks.sub_blocks.pop("prompt_upsampler")
196
 
197
+ pipe = blocks.init_pipeline("PrunaAI/P-Image-OSS")
198
  pipe.load_components(dtype=torch.bfloat16)
199
  pipe.to("cuda")
200
  image = pipe(prompt=prompt, height=3360, width=2496, output="images")[0] # rendered as written
 
210
  3. **Spell out every word.** Text without its exact words turns into pseudo-text. Put each piece of text in quotes,
211
  keep each string short, say where it sits, and end with "no other text". If you want no text, don't mention signs
212
  or labels at all.
213
+ 4. **Leave out hype words.** Stunning, epic, cinematic, vibrant, hyper-detailed, 8k or masterpiece push P-Image-OSS
214
  toward a glossy, oversaturated, airbrushed look.
215
 
216
  <p align="center">
 
233
  ## Editing
234
 
235
  Pass one image to edit it, or a list of up to 8. Picture 1 is the image to edit, and the others are references the
236
+ request can name as Picture 2, Picture 3 and so on. The upsampler writes the edit prompt in the form P-Image-OSS edits
237
  best from, so a short request such as "make the pickup truck red" is enough.
238
 
239
  <p align="center">
 
241
  </p>
242
 
243
  *The same short request given as typed (middle) and written as an edit prompt that names what to keep (right), the form
244
+ the upsampler writes. As typed, P-Image-OSS often redraws the whole scene. As an edit prompt, only the requested part
245
  changes.*
246
 
247
+ P-Image-OSS combines many references at once. Given up to 8 pictures and a one-line request, the upsampler names each
248
+ picture and what to take from it, and P-Image-OSS composes them into one scene.
249
 
250
  <p align="center">
251
  <img src="assets/multi_image.jpg" width="100%">
252
  </p>
253
 
254
+ *Top, eight public-domain portraits and the dinner party P-Image-OSS composed from them, from a one-sentence request.
255
  Bottom, eight scientists at a poker table, seven presidents wading through the swamp with an astronaut, and characters
256
  from our own renders in the same swamp.*
257
 
 
266
  - **Describe the result, not the action.** Say how the edited part looks in the finished image, and give new things a
267
  size next to something already there, such as "about the size of the cat's head".
268
  - **Say what stays.** List what must not change, such as faces, poses, the background and the light. Without this
269
+ list, P-Image-OSS tends to redraw the whole image.
270
  - **Quote new text exactly.** Put new text in quotes and name the text around it that must stay.
271
 
272
  ## Less GPU memory
 
281
  manager = ComponentsManager()
282
  manager.enable_auto_cpu_offload(device="cuda")
283
 
284
+ pipe = ModularPipeline.from_pretrained("PrunaAI/P-Image-OSS", components_manager=manager)
285
  pipe.load_components(dtype=torch.bfloat16)
286
  image = pipe(prompt=prompt, height=3360, width=2496, output="images")[0]
287
  ```
 
308
  longer passages sometimes get single letters wrong. Short quoted strings render well.
309
  - **Lower resolutions show more artifacts.** At 2 and 4 MP, faces, hands and small details break more often than at
310
  8 MP.
311
+ - **Single images only.** P-Image-OSS does not generate video or audio.
312
 
313
  ## License
314
 
315
+ P-Image-OSS is based on MiniMax-H3 and released under the [MiniMax H3 Community License](LICENSE). Please read it before
316
  use. Among other terms, it excludes the European Union, the United Kingdom, the Republic of Korea and the United States
317
  unless you have a separate license from MiniMax, and products built on it must show "Powered by MiniMax H3". The text
318
  encoder's Qwen3-VL-4B parts and the prompt upsampler, based on Qwen3.5-9B, are under the
assets/{P-H3-Image-latency.png → P-Image-OSS-latency.png} RENAMED
File without changes
assets/{P-H3-Image-memory.png → P-Image-OSS-memory.png} RENAMED
File without changes
assets/{P-H3-Image-weights.png → P-Image-OSS-weights.png} RENAMED
File without changes
assets/{p-h3-image.jpg → p-image-oss.jpg} RENAMED
File without changes
modular_model_index.json CHANGED
@@ -25,7 +25,7 @@
25
  "transformers",
26
  "Qwen3VLForConditionalGeneration"
27
  ],
28
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
29
  "subfolder": "text_encoder",
30
  "variant": null,
31
  "revision": null
@@ -39,7 +39,7 @@
39
  "diffusers",
40
  "PH3ImageTextConnector"
41
  ],
42
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
43
  "subfolder": "text_connector",
44
  "variant": null,
45
  "revision": null
@@ -53,7 +53,7 @@
53
  "transformers",
54
  "Qwen2TokenizerFast"
55
  ],
56
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
57
  "subfolder": "tokenizer",
58
  "variant": null,
59
  "revision": null
@@ -67,7 +67,7 @@
67
  "transformers",
68
  "Qwen3VLProcessor"
69
  ],
70
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
71
  "subfolder": "processor",
72
  "variant": null,
73
  "revision": null
@@ -81,7 +81,7 @@
81
  "diffusers",
82
  "AutoencoderKLPH3Image"
83
  ],
84
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
85
  "subfolder": "vae",
86
  "variant": null,
87
  "revision": null
@@ -95,7 +95,7 @@
95
  "diffusers",
96
  "MiniMaxH3Transformer3DModel"
97
  ],
98
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
99
  "subfolder": "transformer",
100
  "variant": null,
101
  "revision": null
@@ -109,7 +109,7 @@
109
  "diffusers",
110
  "MiniMaxH3Scheduler"
111
  ],
112
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
113
  "subfolder": "scheduler",
114
  "variant": null,
115
  "revision": null
@@ -123,7 +123,7 @@
123
  "diffusers",
124
  "MiniMaxH3Scheduler"
125
  ],
126
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
127
  "subfolder": "audio_scheduler",
128
  "variant": null,
129
  "revision": null
@@ -133,7 +133,7 @@
133
  "transformers",
134
  "Qwen3_5ForConditionalGeneration",
135
  {
136
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
137
  "revision": null,
138
  "subfolder": "prompt_upsampler",
139
  "type_hint": [
@@ -147,7 +147,7 @@
147
  "transformers",
148
  "AutoProcessor",
149
  {
150
- "pretrained_model_name_or_path": "PrunaAI/P-H3-Image",
151
  "revision": null,
152
  "subfolder": "prompt_upsampler_processor",
153
  "type_hint": [
 
25
  "transformers",
26
  "Qwen3VLForConditionalGeneration"
27
  ],
28
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
29
  "subfolder": "text_encoder",
30
  "variant": null,
31
  "revision": null
 
39
  "diffusers",
40
  "PH3ImageTextConnector"
41
  ],
42
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
43
  "subfolder": "text_connector",
44
  "variant": null,
45
  "revision": null
 
53
  "transformers",
54
  "Qwen2TokenizerFast"
55
  ],
56
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
57
  "subfolder": "tokenizer",
58
  "variant": null,
59
  "revision": null
 
67
  "transformers",
68
  "Qwen3VLProcessor"
69
  ],
70
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
71
  "subfolder": "processor",
72
  "variant": null,
73
  "revision": null
 
81
  "diffusers",
82
  "AutoencoderKLPH3Image"
83
  ],
84
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
85
  "subfolder": "vae",
86
  "variant": null,
87
  "revision": null
 
95
  "diffusers",
96
  "MiniMaxH3Transformer3DModel"
97
  ],
98
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
99
  "subfolder": "transformer",
100
  "variant": null,
101
  "revision": null
 
109
  "diffusers",
110
  "MiniMaxH3Scheduler"
111
  ],
112
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
113
  "subfolder": "scheduler",
114
  "variant": null,
115
  "revision": null
 
123
  "diffusers",
124
  "MiniMaxH3Scheduler"
125
  ],
126
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
127
  "subfolder": "audio_scheduler",
128
  "variant": null,
129
  "revision": null
 
133
  "transformers",
134
  "Qwen3_5ForConditionalGeneration",
135
  {
136
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
137
  "revision": null,
138
  "subfolder": "prompt_upsampler",
139
  "type_hint": [
 
147
  "transformers",
148
  "AutoProcessor",
149
  {
150
+ "pretrained_model_name_or_path": "PrunaAI/P-Image-OSS",
151
  "revision": null,
152
  "subfolder": "prompt_upsampler_processor",
153
  "type_hint": [