Skip to content

[doc wip] literalinclude #2718

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

Merged
merged 1 commit into from
Mar 23, 2023
Merged

[doc wip] literalinclude #2718

merged 1 commit into from
Mar 23, 2023

Conversation

mishig25
Copy link
Contributor

@mishig25 mishig25 commented Mar 17, 2023

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 17, 2023

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten
Copy link
Contributor

I like this so that we don't have to copy-paste code. @yiyixuxu and @stevhliu could you check here as well?

--output_dir="sd-pokemon-model"
```
<literalinclude>
{"path": "../../../../examples/text_to_image/README.md",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is relative path to examples/text_to_image/README.md from perspective of current file, which is docs/source/en/training/text2image.mdx

@@ -52,7 +52,7 @@ If you have already cloned the repo, then you won't need to go through these ste
With `gradient_checkpointing` and `mixed_precision` it should be possible to fine tune the model on a single 24GB GPU. For higher `batch_size` and faster training it's better to use GPUs with >30GB memory.

**___Note: Change the `resolution` to 768 if you are using the [stable-diffusion-2](https://huggingface.co/stabilityai/stable-diffusion-2) 768x768 model.___**

<!-- accelerate_snippet_start -->
Copy link
Contributor Author

@mishig25 mishig25 Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use comment as a marker. In markdowns, you can use html style commenting <!-- bla xyz -->

Comment on lines +80 to +81
"start-after": "accelerate_snippet_start",
"end-before": "accelerate_snippet_end",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yiyixuxu
Copy link
Collaborator

This is great! Thank you!! @mishig25

@stevhliu
Copy link
Member

Super cool, I've added this to the Documentation Notion in case other teams are interested. Thanks @mishig25 !

@patrickvonplaten patrickvonplaten merged commit 8e35ef0 into main Mar 23, 2023
@patrickvonplaten
Copy link
Contributor

Nice @mishig25 !

@patrickvonplaten patrickvonplaten deleted the text_doc_literalinclude branch March 23, 2023 12:43
@sayakpaul
Copy link
Member

@mishig25 is it possible to automatically mirror the README of an example in the corresponding documentation page?

For this example, it would be https://github.com/huggingface/diffusers/blob/main/examples/text_to_image and its corresponding doc: https://huggingface.co/docs/diffusers/training/text2image. I think that would be great.

w4ffl35 pushed a commit to w4ffl35/diffusers that referenced this pull request Apr 14, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants