OzzyGT HF Staff commited on
Commit
9fdd475
·
verified ·
1 Parent(s): cf8bdf6

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -39
README.md CHANGED
@@ -131,45 +131,6 @@ image = pipe(
131
  image.save("moss_image_int4.png")
132
  ```
133
 
134
- ## Reference images
135
-
136
- MOSS-Image can also take reference images, through the vision part of its Qwen3.5 text encoder. The model wasn't trained for this: references guide the content, style and layout of the image, not exact pixels or identity. Load the `reference` workflow and pass the images with `reference_images`:
137
-
138
- ```python
139
- import sdnq # noqa: F401
140
- import torch
141
- from diffusers import ModularPipelineBlocks
142
- from diffusers.utils import load_image
143
-
144
-
145
- blocks = ModularPipelineBlocks.from_pretrained(
146
- "OzzyGT/moss_image_custom_blocks",
147
- trust_remote_code=True,
148
- components_repo="OzzyGT/MOSS_Image_Base_sdnq_dynamic_4bit",
149
- trust_components_code=True,
150
- )
151
- pipe = blocks.init_pipeline()
152
- pipe.load_components(workflow="reference", dtype={"default": torch.bfloat16, "vae": torch.float32})
153
- pipe.to("cuda")
154
-
155
- reference = load_image(
156
- "https://huggingface.co/datasets/OzzyGT/diffusers-examples/resolve/main/krea2_reference/20260907154202_edit_image_0.png"
157
- )
158
-
159
- image = pipe(
160
- prompt="photo",
161
- reference_images=reference,
162
- num_inference_steps=28,
163
- height=1024,
164
- width=1024,
165
- generator=torch.Generator("cuda").manual_seed(42),
166
- output="images",
167
- )[0]
168
- image.save("moss_image_reference.png")
169
- ```
170
-
171
- `reference_max_pixels` (default 1024 x 1024) sets how large each reference is for the vision encoder. To load only what text-to-image needs, without the vision encoder, use `workflow="text2image"` as in the sample above.
172
-
173
  ## License
174
 
175
  This model is released under the [Apache-2.0 license](LICENSE), the same as the original.
 
131
  image.save("moss_image_int4.png")
132
  ```
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  ## License
135
 
136
  This model is released under the [Apache-2.0 license](LICENSE), the same as the original.