-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Community tips #7137
[docs] Community tips #7137
Conversation
Hi! Is there any detailed description or citation of negative noise, and example code of how to make it? Seems to be missing for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all looks good to me, thank you.
image = pipe( | ||
prompt = "A croissant shaped like a cute bear." | ||
negative_prompt = "Deformed, ugly, bad anatomy" | ||
callback_on_step_end=decode_tensors, | ||
callback_on_step_end_tensor_inputs=["latents"], | ||
).images[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image = pipe( | |
prompt = "A croissant shaped like a cute bear." | |
negative_prompt = "Deformed, ugly, bad anatomy" | |
callback_on_step_end=decode_tensors, | |
callback_on_step_end_tensor_inputs=["latents"], | |
).images[0] | |
image = pipe( | |
prompt="A croissant shaped like a cute bear." | |
negative_prompt="Deformed, ugly, bad anatomy" | |
callback_on_step_end=decode_tensors, | |
callback_on_step_end_tensor_inputs=["latents"], | |
).images[0] |
Because I am a Pythonista :v
pipeline.load_lora_weights('.', weight_name="marcille.safetensors") | ||
``` | ||
|
||
3. Load a scheduler and set `use_karras_sigmas=True` to use the DPM++ 2M Karras scheduler (take a look at this [scheduler table](../api/schedulers/overview.) to find the A1111 equivalent scheduler in Diffusers). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can directly link to DPMSolverMultistepScheduler
here no?
```py | ||
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config) | ||
pipeline.scheduler.config.use_karras_sigmas=True | ||
pipeline.to("cuda") | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```py | |
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config) | |
pipeline.scheduler.config.use_karras_sigmas=True | |
pipeline.to("cuda") | |
``` | |
```py | |
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config) | |
pipeline.scheduler.config.use_karras_sigmas = True | |
pipeline.to("cuda") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking solid. Thanks so much for putting this together.
@asomoza hat-tip 🫡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about moving the callback examples to callback page? https://huggingface.co/docs/diffusers/main/en/using-diffusers/callback
we can create a section there called "community examples"?
the animte example we don't have to include in the doc right now, we can discuss a little bit more on how to organizing these contents
Not all the tips here belong to the usage of callbacks no? |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@ultranity
|
yes yes - I'm just not sure about the best way to organize these contents yet. I'm hoping to see a lot more of these cool community examples and I don't think we should have one page of a random collection of them |
I just added the"display after each generation step" callback for now to our callback doc, and we can add the other features from @asomoza in a later PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh thanks!
This PR adds a callback for displaying image after each generation step.