Unverified Commit 5937e11d authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

[docs] small corrections to the example in the Qwen docs (#12068)

* up

* up
parent 9c1d4e3b
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
# QwenImage # QwenImage
<!-- TODO: update this section when model is out --> Qwen-Image from the Qwen team is an image generation foundation model in the Qwen series that achieves significant advances in complex text rendering and precise image editing. Experiments show strong general capabilities in both image generation and editing, with exceptional performance in text rendering, especially for Chinese.
Check out the model card [here](https://huggingface.co/Qwen/Qwen-Image) to learn more.
<Tip> <Tip>
...@@ -28,6 +30,6 @@ Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) ...@@ -28,6 +30,6 @@ Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers)
- all - all
- __call__ - __call__
## QwenImagePipeline ## QwenImagePipelineOutput
[[autodoc]] pipelines.qwenimage.pipeline_output.QwenImagePipelineOutput [[autodoc]] pipelines.qwenimage.pipeline_output.QwenImagePipelineOutput
...@@ -122,7 +122,7 @@ We provide several options for optimizing memory optimization: ...@@ -122,7 +122,7 @@ We provide several options for optimizing memory optimization:
* `cache_latents`: When enabled, we will pre-compute the latents from the input images with the VAE and remove the VAE from memory once done. * `cache_latents`: When enabled, we will pre-compute the latents from the input images with the VAE and remove the VAE from memory once done.
* `--use_8bit_adam`: When enabled, we will use the 8bit version of AdamW provided by the `bitsandbytes` library. * `--use_8bit_adam`: When enabled, we will use the 8bit version of AdamW provided by the `bitsandbytes` library.
Refer to the [official documentation](https://huggingface.co/docs/diffusers/main/en/api/pipelines/qwen) of the `QwenImagePipeline` to know more about the models available under the SANA family and their preferred dtypes during inference. Refer to the [official documentation](https://huggingface.co/docs/diffusers/main/en/api/pipelines/qwenimage) of the `QwenImagePipeline` to know more about the models available under the SANA family and their preferred dtypes during inference.
## Using quantization ## Using quantization
......
...@@ -45,12 +45,12 @@ EXAMPLE_DOC_STRING = """ ...@@ -45,12 +45,12 @@ EXAMPLE_DOC_STRING = """
>>> import torch >>> import torch
>>> from diffusers import QwenImagePipeline >>> from diffusers import QwenImagePipeline
>>> pipe = QwenImagePipeline.from_pretrained("Qwen/QwenImage-20B", torch_dtype=torch.bfloat16) >>> pipe = QwenImagePipeline.from_pretrained("Qwen/Qwen-Image", torch_dtype=torch.bfloat16)
>>> pipe.to("cuda") >>> pipe.to("cuda")
>>> prompt = "A cat holding a sign that says hello world" >>> prompt = "A cat holding a sign that says hello world"
>>> # Depending on the variant being used, the pipeline call will slightly vary. >>> # Depending on the variant being used, the pipeline call will slightly vary.
>>> # Refer to the pipeline documentation for more details. >>> # Refer to the pipeline documentation for more details.
>>> image = pipe(prompt, num_inference_steps=4, guidance_scale=0.0).images[0] >>> image = pipe(prompt, num_inference_steps=50).images[0]
>>> image.save("qwenimage.png") >>> image.save("qwenimage.png")
``` ```
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment