"vscode:/vscode.git/clone" did not exist on "5568744c4b7de1bcd397a06b94ef92cf1fd30a29"
Unverified Commit 045157a4 authored by Pedro Cuenca's avatar Pedro Cuenca Committed by GitHub
Browse files

Fix Flax usage comments (#1211)

* Fix Flax usage comments (they didn't work).

* Spell out dtype

* make style
parent a09d4753
...@@ -268,18 +268,27 @@ class FlaxDiffusionPipeline(ConfigMixin): ...@@ -268,18 +268,27 @@ class FlaxDiffusionPipeline(ConfigMixin):
>>> from diffusers import FlaxDiffusionPipeline >>> from diffusers import FlaxDiffusionPipeline
>>> # Download pipeline from huggingface.co and cache. >>> # Download pipeline from huggingface.co and cache.
>>> pipeline = FlaxDiffusionPipeline.from_pretrained("CompVis/ldm-text2im-large-256") >>> # Requires to be logged in to Hugging Face hub,
>>> # see more in [the documentation](https://huggingface.co/docs/hub/security-tokens)
>>> # Download pipeline that requires an authorization token >>> pipeline, params = FlaxDiffusionPipeline.from_pretrained(
>>> # For more information on access tokens, please refer to this section ... "runwayml/stable-diffusion-v1-5",
>>> # of the documentation](https://huggingface.co/docs/hub/security-tokens) ... revision="bf16",
>>> pipeline = FlaxDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5") ... dtype=jnp.bfloat16,
... )
>>> # Download pipeline, but overwrite scheduler
>>> from diffusers import LMSDiscreteScheduler >>> # Download pipeline, but use a different scheduler
>>> from diffusers import FlaxDPMSolverMultistepScheduler
>>> scheduler = LMSDiscreteScheduler.from_config("runwayml/stable-diffusion-v1-5", subfolder="scheduler")
>>> pipeline = FlaxDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", scheduler=scheduler) >>> model_id = "runwayml/stable-diffusion-v1-5"
>>> sched, sched_state = FlaxDPMSolverMultistepScheduler.from_config(
... model_id,
... subfolder="scheduler",
... )
>>> dpm_pipe, dpm_params = FlaxStableDiffusionPipeline.from_pretrained(
... model_id, revision="bf16", dtype=jnp.bfloat16, scheduler=dpmpp
... )
>>> dpm_params["scheduler"] = dpmpp_state
``` ```
""" """
cache_dir = kwargs.pop("cache_dir", DIFFUSERS_CACHE) cache_dir = kwargs.pop("cache_dir", DIFFUSERS_CACHE)
......
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