@synsci/cli-darwin-x64 1.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/skills/accelerate/SKILL.md +332 -0
- package/bin/skills/accelerate/references/custom-plugins.md +453 -0
- package/bin/skills/accelerate/references/megatron-integration.md +489 -0
- package/bin/skills/accelerate/references/performance.md +525 -0
- package/bin/skills/audiocraft/SKILL.md +564 -0
- package/bin/skills/audiocraft/references/advanced-usage.md +666 -0
- package/bin/skills/audiocraft/references/troubleshooting.md +504 -0
- package/bin/skills/autogpt/SKILL.md +403 -0
- package/bin/skills/autogpt/references/advanced-usage.md +535 -0
- package/bin/skills/autogpt/references/troubleshooting.md +420 -0
- package/bin/skills/awq/SKILL.md +310 -0
- package/bin/skills/awq/references/advanced-usage.md +324 -0
- package/bin/skills/awq/references/troubleshooting.md +344 -0
- package/bin/skills/axolotl/SKILL.md +158 -0
- package/bin/skills/axolotl/references/api.md +5548 -0
- package/bin/skills/axolotl/references/dataset-formats.md +1029 -0
- package/bin/skills/axolotl/references/index.md +15 -0
- package/bin/skills/axolotl/references/other.md +3563 -0
- package/bin/skills/bigcode-evaluation-harness/SKILL.md +405 -0
- package/bin/skills/bigcode-evaluation-harness/references/benchmarks.md +393 -0
- package/bin/skills/bigcode-evaluation-harness/references/custom-tasks.md +424 -0
- package/bin/skills/bigcode-evaluation-harness/references/issues.md +394 -0
- package/bin/skills/bitsandbytes/SKILL.md +411 -0
- package/bin/skills/bitsandbytes/references/memory-optimization.md +521 -0
- package/bin/skills/bitsandbytes/references/qlora-training.md +521 -0
- package/bin/skills/bitsandbytes/references/quantization-formats.md +447 -0
- package/bin/skills/blip-2/SKILL.md +564 -0
- package/bin/skills/blip-2/references/advanced-usage.md +680 -0
- package/bin/skills/blip-2/references/troubleshooting.md +526 -0
- package/bin/skills/chroma/SKILL.md +406 -0
- package/bin/skills/chroma/references/integration.md +38 -0
- package/bin/skills/clip/SKILL.md +253 -0
- package/bin/skills/clip/references/applications.md +207 -0
- package/bin/skills/constitutional-ai/SKILL.md +290 -0
- package/bin/skills/crewai/SKILL.md +498 -0
- package/bin/skills/crewai/references/flows.md +438 -0
- package/bin/skills/crewai/references/tools.md +429 -0
- package/bin/skills/crewai/references/troubleshooting.md +480 -0
- package/bin/skills/deepspeed/SKILL.md +141 -0
- package/bin/skills/deepspeed/references/08.md +17 -0
- package/bin/skills/deepspeed/references/09.md +173 -0
- package/bin/skills/deepspeed/references/2020.md +378 -0
- package/bin/skills/deepspeed/references/2023.md +279 -0
- package/bin/skills/deepspeed/references/assets.md +179 -0
- package/bin/skills/deepspeed/references/index.md +35 -0
- package/bin/skills/deepspeed/references/mii.md +118 -0
- package/bin/skills/deepspeed/references/other.md +1191 -0
- package/bin/skills/deepspeed/references/tutorials.md +6554 -0
- package/bin/skills/dspy/SKILL.md +590 -0
- package/bin/skills/dspy/references/examples.md +663 -0
- package/bin/skills/dspy/references/modules.md +475 -0
- package/bin/skills/dspy/references/optimizers.md +566 -0
- package/bin/skills/faiss/SKILL.md +221 -0
- package/bin/skills/faiss/references/index_types.md +280 -0
- package/bin/skills/flash-attention/SKILL.md +367 -0
- package/bin/skills/flash-attention/references/benchmarks.md +215 -0
- package/bin/skills/flash-attention/references/transformers-integration.md +293 -0
- package/bin/skills/gguf/SKILL.md +427 -0
- package/bin/skills/gguf/references/advanced-usage.md +504 -0
- package/bin/skills/gguf/references/troubleshooting.md +442 -0
- package/bin/skills/gptq/SKILL.md +450 -0
- package/bin/skills/gptq/references/calibration.md +337 -0
- package/bin/skills/gptq/references/integration.md +129 -0
- package/bin/skills/gptq/references/troubleshooting.md +95 -0
- package/bin/skills/grpo-rl-training/README.md +97 -0
- package/bin/skills/grpo-rl-training/SKILL.md +572 -0
- package/bin/skills/grpo-rl-training/examples/reward_functions_library.py +393 -0
- package/bin/skills/grpo-rl-training/templates/basic_grpo_training.py +228 -0
- package/bin/skills/guidance/SKILL.md +572 -0
- package/bin/skills/guidance/references/backends.md +554 -0
- package/bin/skills/guidance/references/constraints.md +674 -0
- package/bin/skills/guidance/references/examples.md +767 -0
- package/bin/skills/hqq/SKILL.md +445 -0
- package/bin/skills/hqq/references/advanced-usage.md +528 -0
- package/bin/skills/hqq/references/troubleshooting.md +503 -0
- package/bin/skills/hugging-face-cli/SKILL.md +191 -0
- package/bin/skills/hugging-face-cli/references/commands.md +954 -0
- package/bin/skills/hugging-face-cli/references/examples.md +374 -0
- package/bin/skills/hugging-face-datasets/SKILL.md +547 -0
- package/bin/skills/hugging-face-datasets/examples/diverse_training_examples.json +239 -0
- package/bin/skills/hugging-face-datasets/examples/system_prompt_template.txt +196 -0
- package/bin/skills/hugging-face-datasets/examples/training_examples.json +176 -0
- package/bin/skills/hugging-face-datasets/scripts/dataset_manager.py +522 -0
- package/bin/skills/hugging-face-datasets/scripts/sql_manager.py +844 -0
- package/bin/skills/hugging-face-datasets/templates/chat.json +55 -0
- package/bin/skills/hugging-face-datasets/templates/classification.json +62 -0
- package/bin/skills/hugging-face-datasets/templates/completion.json +51 -0
- package/bin/skills/hugging-face-datasets/templates/custom.json +75 -0
- package/bin/skills/hugging-face-datasets/templates/qa.json +54 -0
- package/bin/skills/hugging-face-datasets/templates/tabular.json +81 -0
- package/bin/skills/hugging-face-evaluation/SKILL.md +656 -0
- package/bin/skills/hugging-face-evaluation/examples/USAGE_EXAMPLES.md +382 -0
- package/bin/skills/hugging-face-evaluation/examples/artificial_analysis_to_hub.py +141 -0
- package/bin/skills/hugging-face-evaluation/examples/example_readme_tables.md +135 -0
- package/bin/skills/hugging-face-evaluation/examples/metric_mapping.json +50 -0
- package/bin/skills/hugging-face-evaluation/requirements.txt +20 -0
- package/bin/skills/hugging-face-evaluation/scripts/evaluation_manager.py +1374 -0
- package/bin/skills/hugging-face-evaluation/scripts/inspect_eval_uv.py +104 -0
- package/bin/skills/hugging-face-evaluation/scripts/inspect_vllm_uv.py +317 -0
- package/bin/skills/hugging-face-evaluation/scripts/lighteval_vllm_uv.py +303 -0
- package/bin/skills/hugging-face-evaluation/scripts/run_eval_job.py +98 -0
- package/bin/skills/hugging-face-evaluation/scripts/run_vllm_eval_job.py +331 -0
- package/bin/skills/hugging-face-evaluation/scripts/test_extraction.py +206 -0
- package/bin/skills/hugging-face-jobs/SKILL.md +1041 -0
- package/bin/skills/hugging-face-jobs/index.html +216 -0
- package/bin/skills/hugging-face-jobs/references/hardware_guide.md +336 -0
- package/bin/skills/hugging-face-jobs/references/hub_saving.md +352 -0
- package/bin/skills/hugging-face-jobs/references/token_usage.md +546 -0
- package/bin/skills/hugging-face-jobs/references/troubleshooting.md +475 -0
- package/bin/skills/hugging-face-jobs/scripts/cot-self-instruct.py +718 -0
- package/bin/skills/hugging-face-jobs/scripts/finepdfs-stats.py +546 -0
- package/bin/skills/hugging-face-jobs/scripts/generate-responses.py +587 -0
- package/bin/skills/hugging-face-model-trainer/SKILL.md +711 -0
- package/bin/skills/hugging-face-model-trainer/references/gguf_conversion.md +296 -0
- package/bin/skills/hugging-face-model-trainer/references/hardware_guide.md +283 -0
- package/bin/skills/hugging-face-model-trainer/references/hub_saving.md +364 -0
- package/bin/skills/hugging-face-model-trainer/references/reliability_principles.md +371 -0
- package/bin/skills/hugging-face-model-trainer/references/trackio_guide.md +189 -0
- package/bin/skills/hugging-face-model-trainer/references/training_methods.md +150 -0
- package/bin/skills/hugging-face-model-trainer/references/training_patterns.md +203 -0
- package/bin/skills/hugging-face-model-trainer/references/troubleshooting.md +282 -0
- package/bin/skills/hugging-face-model-trainer/scripts/convert_to_gguf.py +424 -0
- package/bin/skills/hugging-face-model-trainer/scripts/dataset_inspector.py +417 -0
- package/bin/skills/hugging-face-model-trainer/scripts/estimate_cost.py +150 -0
- package/bin/skills/hugging-face-model-trainer/scripts/train_dpo_example.py +106 -0
- package/bin/skills/hugging-face-model-trainer/scripts/train_grpo_example.py +89 -0
- package/bin/skills/hugging-face-model-trainer/scripts/train_sft_example.py +122 -0
- package/bin/skills/hugging-face-paper-publisher/SKILL.md +627 -0
- package/bin/skills/hugging-face-paper-publisher/examples/example_usage.md +327 -0
- package/bin/skills/hugging-face-paper-publisher/references/quick_reference.md +216 -0
- package/bin/skills/hugging-face-paper-publisher/scripts/paper_manager.py +508 -0
- package/bin/skills/hugging-face-paper-publisher/templates/arxiv.md +299 -0
- package/bin/skills/hugging-face-paper-publisher/templates/ml-report.md +358 -0
- package/bin/skills/hugging-face-paper-publisher/templates/modern.md +319 -0
- package/bin/skills/hugging-face-paper-publisher/templates/standard.md +201 -0
- package/bin/skills/hugging-face-tool-builder/SKILL.md +115 -0
- package/bin/skills/hugging-face-tool-builder/references/baseline_hf_api.py +57 -0
- package/bin/skills/hugging-face-tool-builder/references/baseline_hf_api.sh +40 -0
- package/bin/skills/hugging-face-tool-builder/references/baseline_hf_api.tsx +57 -0
- package/bin/skills/hugging-face-tool-builder/references/find_models_by_paper.sh +230 -0
- package/bin/skills/hugging-face-tool-builder/references/hf_enrich_models.sh +96 -0
- package/bin/skills/hugging-face-tool-builder/references/hf_model_card_frontmatter.sh +188 -0
- package/bin/skills/hugging-face-tool-builder/references/hf_model_papers_auth.sh +171 -0
- package/bin/skills/hugging-face-trackio/SKILL.md +65 -0
- package/bin/skills/hugging-face-trackio/references/logging_metrics.md +206 -0
- package/bin/skills/hugging-face-trackio/references/retrieving_metrics.md +223 -0
- package/bin/skills/huggingface-tokenizers/SKILL.md +516 -0
- package/bin/skills/huggingface-tokenizers/references/algorithms.md +653 -0
- package/bin/skills/huggingface-tokenizers/references/integration.md +637 -0
- package/bin/skills/huggingface-tokenizers/references/pipeline.md +723 -0
- package/bin/skills/huggingface-tokenizers/references/training.md +565 -0
- package/bin/skills/instructor/SKILL.md +740 -0
- package/bin/skills/instructor/references/examples.md +107 -0
- package/bin/skills/instructor/references/providers.md +70 -0
- package/bin/skills/instructor/references/validation.md +606 -0
- package/bin/skills/knowledge-distillation/SKILL.md +458 -0
- package/bin/skills/knowledge-distillation/references/minillm.md +334 -0
- package/bin/skills/lambda-labs/SKILL.md +545 -0
- package/bin/skills/lambda-labs/references/advanced-usage.md +611 -0
- package/bin/skills/lambda-labs/references/troubleshooting.md +530 -0
- package/bin/skills/langchain/SKILL.md +480 -0
- package/bin/skills/langchain/references/agents.md +499 -0
- package/bin/skills/langchain/references/integration.md +562 -0
- package/bin/skills/langchain/references/rag.md +600 -0
- package/bin/skills/langsmith/SKILL.md +422 -0
- package/bin/skills/langsmith/references/advanced-usage.md +548 -0
- package/bin/skills/langsmith/references/troubleshooting.md +537 -0
- package/bin/skills/litgpt/SKILL.md +469 -0
- package/bin/skills/litgpt/references/custom-models.md +568 -0
- package/bin/skills/litgpt/references/distributed-training.md +451 -0
- package/bin/skills/litgpt/references/supported-models.md +336 -0
- package/bin/skills/litgpt/references/training-recipes.md +619 -0
- package/bin/skills/llama-cpp/SKILL.md +258 -0
- package/bin/skills/llama-cpp/references/optimization.md +89 -0
- package/bin/skills/llama-cpp/references/quantization.md +213 -0
- package/bin/skills/llama-cpp/references/server.md +125 -0
- package/bin/skills/llama-factory/SKILL.md +80 -0
- package/bin/skills/llama-factory/references/_images.md +23 -0
- package/bin/skills/llama-factory/references/advanced.md +1055 -0
- package/bin/skills/llama-factory/references/getting_started.md +349 -0
- package/bin/skills/llama-factory/references/index.md +19 -0
- package/bin/skills/llama-factory/references/other.md +31 -0
- package/bin/skills/llamaguard/SKILL.md +337 -0
- package/bin/skills/llamaindex/SKILL.md +569 -0
- package/bin/skills/llamaindex/references/agents.md +83 -0
- package/bin/skills/llamaindex/references/data_connectors.md +108 -0
- package/bin/skills/llamaindex/references/query_engines.md +406 -0
- package/bin/skills/llava/SKILL.md +304 -0
- package/bin/skills/llava/references/training.md +197 -0
- package/bin/skills/lm-evaluation-harness/SKILL.md +490 -0
- package/bin/skills/lm-evaluation-harness/references/api-evaluation.md +490 -0
- package/bin/skills/lm-evaluation-harness/references/benchmark-guide.md +488 -0
- package/bin/skills/lm-evaluation-harness/references/custom-tasks.md +602 -0
- package/bin/skills/lm-evaluation-harness/references/distributed-eval.md +519 -0
- package/bin/skills/long-context/SKILL.md +536 -0
- package/bin/skills/long-context/references/extension_methods.md +468 -0
- package/bin/skills/long-context/references/fine_tuning.md +611 -0
- package/bin/skills/long-context/references/rope.md +402 -0
- package/bin/skills/mamba/SKILL.md +260 -0
- package/bin/skills/mamba/references/architecture-details.md +206 -0
- package/bin/skills/mamba/references/benchmarks.md +255 -0
- package/bin/skills/mamba/references/training-guide.md +388 -0
- package/bin/skills/megatron-core/SKILL.md +366 -0
- package/bin/skills/megatron-core/references/benchmarks.md +249 -0
- package/bin/skills/megatron-core/references/parallelism-guide.md +404 -0
- package/bin/skills/megatron-core/references/production-examples.md +473 -0
- package/bin/skills/megatron-core/references/training-recipes.md +547 -0
- package/bin/skills/miles/SKILL.md +315 -0
- package/bin/skills/miles/references/api-reference.md +141 -0
- package/bin/skills/miles/references/troubleshooting.md +352 -0
- package/bin/skills/mlflow/SKILL.md +704 -0
- package/bin/skills/mlflow/references/deployment.md +744 -0
- package/bin/skills/mlflow/references/model-registry.md +770 -0
- package/bin/skills/mlflow/references/tracking.md +680 -0
- package/bin/skills/modal/SKILL.md +341 -0
- package/bin/skills/modal/references/advanced-usage.md +503 -0
- package/bin/skills/modal/references/troubleshooting.md +494 -0
- package/bin/skills/model-merging/SKILL.md +539 -0
- package/bin/skills/model-merging/references/evaluation.md +462 -0
- package/bin/skills/model-merging/references/examples.md +428 -0
- package/bin/skills/model-merging/references/methods.md +352 -0
- package/bin/skills/model-pruning/SKILL.md +495 -0
- package/bin/skills/model-pruning/references/wanda.md +347 -0
- package/bin/skills/moe-training/SKILL.md +526 -0
- package/bin/skills/moe-training/references/architectures.md +432 -0
- package/bin/skills/moe-training/references/inference.md +348 -0
- package/bin/skills/moe-training/references/training.md +425 -0
- package/bin/skills/nanogpt/SKILL.md +290 -0
- package/bin/skills/nanogpt/references/architecture.md +382 -0
- package/bin/skills/nanogpt/references/data.md +476 -0
- package/bin/skills/nanogpt/references/training.md +564 -0
- package/bin/skills/nemo-curator/SKILL.md +383 -0
- package/bin/skills/nemo-curator/references/deduplication.md +87 -0
- package/bin/skills/nemo-curator/references/filtering.md +102 -0
- package/bin/skills/nemo-evaluator/SKILL.md +494 -0
- package/bin/skills/nemo-evaluator/references/adapter-system.md +340 -0
- package/bin/skills/nemo-evaluator/references/configuration.md +447 -0
- package/bin/skills/nemo-evaluator/references/custom-benchmarks.md +315 -0
- package/bin/skills/nemo-evaluator/references/execution-backends.md +361 -0
- package/bin/skills/nemo-guardrails/SKILL.md +297 -0
- package/bin/skills/nnsight/SKILL.md +436 -0
- package/bin/skills/nnsight/references/README.md +78 -0
- package/bin/skills/nnsight/references/api.md +344 -0
- package/bin/skills/nnsight/references/tutorials.md +300 -0
- package/bin/skills/openrlhf/SKILL.md +249 -0
- package/bin/skills/openrlhf/references/algorithm-comparison.md +404 -0
- package/bin/skills/openrlhf/references/custom-rewards.md +530 -0
- package/bin/skills/openrlhf/references/hybrid-engine.md +287 -0
- package/bin/skills/openrlhf/references/multi-node-training.md +454 -0
- package/bin/skills/outlines/SKILL.md +652 -0
- package/bin/skills/outlines/references/backends.md +615 -0
- package/bin/skills/outlines/references/examples.md +773 -0
- package/bin/skills/outlines/references/json_generation.md +652 -0
- package/bin/skills/peft/SKILL.md +431 -0
- package/bin/skills/peft/references/advanced-usage.md +514 -0
- package/bin/skills/peft/references/troubleshooting.md +480 -0
- package/bin/skills/phoenix/SKILL.md +475 -0
- package/bin/skills/phoenix/references/advanced-usage.md +619 -0
- package/bin/skills/phoenix/references/troubleshooting.md +538 -0
- package/bin/skills/pinecone/SKILL.md +358 -0
- package/bin/skills/pinecone/references/deployment.md +181 -0
- package/bin/skills/pytorch-fsdp/SKILL.md +126 -0
- package/bin/skills/pytorch-fsdp/references/index.md +7 -0
- package/bin/skills/pytorch-fsdp/references/other.md +4249 -0
- package/bin/skills/pytorch-lightning/SKILL.md +346 -0
- package/bin/skills/pytorch-lightning/references/callbacks.md +436 -0
- package/bin/skills/pytorch-lightning/references/distributed.md +490 -0
- package/bin/skills/pytorch-lightning/references/hyperparameter-tuning.md +556 -0
- package/bin/skills/pyvene/SKILL.md +473 -0
- package/bin/skills/pyvene/references/README.md +73 -0
- package/bin/skills/pyvene/references/api.md +383 -0
- package/bin/skills/pyvene/references/tutorials.md +376 -0
- package/bin/skills/qdrant/SKILL.md +493 -0
- package/bin/skills/qdrant/references/advanced-usage.md +648 -0
- package/bin/skills/qdrant/references/troubleshooting.md +631 -0
- package/bin/skills/ray-data/SKILL.md +326 -0
- package/bin/skills/ray-data/references/integration.md +82 -0
- package/bin/skills/ray-data/references/transformations.md +83 -0
- package/bin/skills/ray-train/SKILL.md +406 -0
- package/bin/skills/ray-train/references/multi-node.md +628 -0
- package/bin/skills/rwkv/SKILL.md +260 -0
- package/bin/skills/rwkv/references/architecture-details.md +344 -0
- package/bin/skills/rwkv/references/rwkv7.md +386 -0
- package/bin/skills/rwkv/references/state-management.md +369 -0
- package/bin/skills/saelens/SKILL.md +386 -0
- package/bin/skills/saelens/references/README.md +70 -0
- package/bin/skills/saelens/references/api.md +333 -0
- package/bin/skills/saelens/references/tutorials.md +318 -0
- package/bin/skills/segment-anything/SKILL.md +500 -0
- package/bin/skills/segment-anything/references/advanced-usage.md +589 -0
- package/bin/skills/segment-anything/references/troubleshooting.md +484 -0
- package/bin/skills/sentence-transformers/SKILL.md +255 -0
- package/bin/skills/sentence-transformers/references/models.md +123 -0
- package/bin/skills/sentencepiece/SKILL.md +235 -0
- package/bin/skills/sentencepiece/references/algorithms.md +200 -0
- package/bin/skills/sentencepiece/references/training.md +304 -0
- package/bin/skills/sglang/SKILL.md +442 -0
- package/bin/skills/sglang/references/deployment.md +490 -0
- package/bin/skills/sglang/references/radix-attention.md +413 -0
- package/bin/skills/sglang/references/structured-generation.md +541 -0
- package/bin/skills/simpo/SKILL.md +219 -0
- package/bin/skills/simpo/references/datasets.md +478 -0
- package/bin/skills/simpo/references/hyperparameters.md +452 -0
- package/bin/skills/simpo/references/loss-functions.md +350 -0
- package/bin/skills/skypilot/SKILL.md +509 -0
- package/bin/skills/skypilot/references/advanced-usage.md +491 -0
- package/bin/skills/skypilot/references/troubleshooting.md +570 -0
- package/bin/skills/slime/SKILL.md +464 -0
- package/bin/skills/slime/references/api-reference.md +392 -0
- package/bin/skills/slime/references/troubleshooting.md +386 -0
- package/bin/skills/speculative-decoding/SKILL.md +467 -0
- package/bin/skills/speculative-decoding/references/lookahead.md +309 -0
- package/bin/skills/speculative-decoding/references/medusa.md +350 -0
- package/bin/skills/stable-diffusion/SKILL.md +519 -0
- package/bin/skills/stable-diffusion/references/advanced-usage.md +716 -0
- package/bin/skills/stable-diffusion/references/troubleshooting.md +555 -0
- package/bin/skills/tensorboard/SKILL.md +629 -0
- package/bin/skills/tensorboard/references/integrations.md +638 -0
- package/bin/skills/tensorboard/references/profiling.md +545 -0
- package/bin/skills/tensorboard/references/visualization.md +620 -0
- package/bin/skills/tensorrt-llm/SKILL.md +187 -0
- package/bin/skills/tensorrt-llm/references/multi-gpu.md +298 -0
- package/bin/skills/tensorrt-llm/references/optimization.md +242 -0
- package/bin/skills/tensorrt-llm/references/serving.md +470 -0
- package/bin/skills/tinker/SKILL.md +362 -0
- package/bin/skills/tinker/references/api-reference.md +168 -0
- package/bin/skills/tinker/references/getting-started.md +157 -0
- package/bin/skills/tinker/references/loss-functions.md +163 -0
- package/bin/skills/tinker/references/models-and-lora.md +139 -0
- package/bin/skills/tinker/references/recipes.md +280 -0
- package/bin/skills/tinker/references/reinforcement-learning.md +212 -0
- package/bin/skills/tinker/references/rendering.md +243 -0
- package/bin/skills/tinker/references/supervised-learning.md +232 -0
- package/bin/skills/tinker-training-cost/SKILL.md +187 -0
- package/bin/skills/tinker-training-cost/scripts/calculate_cost.py +123 -0
- package/bin/skills/torchforge/SKILL.md +433 -0
- package/bin/skills/torchforge/references/api-reference.md +327 -0
- package/bin/skills/torchforge/references/troubleshooting.md +409 -0
- package/bin/skills/torchtitan/SKILL.md +358 -0
- package/bin/skills/torchtitan/references/checkpoint.md +181 -0
- package/bin/skills/torchtitan/references/custom-models.md +258 -0
- package/bin/skills/torchtitan/references/float8.md +133 -0
- package/bin/skills/torchtitan/references/fsdp.md +126 -0
- package/bin/skills/transformer-lens/SKILL.md +346 -0
- package/bin/skills/transformer-lens/references/README.md +54 -0
- package/bin/skills/transformer-lens/references/api.md +362 -0
- package/bin/skills/transformer-lens/references/tutorials.md +339 -0
- package/bin/skills/trl-fine-tuning/SKILL.md +455 -0
- package/bin/skills/trl-fine-tuning/references/dpo-variants.md +227 -0
- package/bin/skills/trl-fine-tuning/references/online-rl.md +82 -0
- package/bin/skills/trl-fine-tuning/references/reward-modeling.md +122 -0
- package/bin/skills/trl-fine-tuning/references/sft-training.md +168 -0
- package/bin/skills/unsloth/SKILL.md +80 -0
- package/bin/skills/unsloth/references/index.md +7 -0
- package/bin/skills/unsloth/references/llms-full.md +16799 -0
- package/bin/skills/unsloth/references/llms-txt.md +12044 -0
- package/bin/skills/unsloth/references/llms.md +82 -0
- package/bin/skills/verl/SKILL.md +391 -0
- package/bin/skills/verl/references/api-reference.md +301 -0
- package/bin/skills/verl/references/troubleshooting.md +391 -0
- package/bin/skills/vllm/SKILL.md +364 -0
- package/bin/skills/vllm/references/optimization.md +226 -0
- package/bin/skills/vllm/references/quantization.md +284 -0
- package/bin/skills/vllm/references/server-deployment.md +255 -0
- package/bin/skills/vllm/references/troubleshooting.md +447 -0
- package/bin/skills/weights-and-biases/SKILL.md +590 -0
- package/bin/skills/weights-and-biases/references/artifacts.md +584 -0
- package/bin/skills/weights-and-biases/references/integrations.md +700 -0
- package/bin/skills/weights-and-biases/references/sweeps.md +847 -0
- package/bin/skills/whisper/SKILL.md +317 -0
- package/bin/skills/whisper/references/languages.md +189 -0
- package/bin/synsc +0 -0
- package/package.json +10 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
# Stable Diffusion Troubleshooting Guide
|
|
2
|
+
|
|
3
|
+
## Installation Issues
|
|
4
|
+
|
|
5
|
+
### Package conflicts
|
|
6
|
+
|
|
7
|
+
**Error**: `ImportError: cannot import name 'cached_download' from 'huggingface_hub'`
|
|
8
|
+
|
|
9
|
+
**Fix**:
|
|
10
|
+
```bash
|
|
11
|
+
# Update huggingface_hub
|
|
12
|
+
pip install --upgrade huggingface_hub
|
|
13
|
+
|
|
14
|
+
# Reinstall diffusers
|
|
15
|
+
pip install --upgrade diffusers
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### xFormers installation fails
|
|
19
|
+
|
|
20
|
+
**Error**: `RuntimeError: CUDA error: no kernel image is available for execution`
|
|
21
|
+
|
|
22
|
+
**Fix**:
|
|
23
|
+
```bash
|
|
24
|
+
# Check CUDA version
|
|
25
|
+
nvcc --version
|
|
26
|
+
|
|
27
|
+
# Install matching xformers
|
|
28
|
+
pip install xformers --index-url https://download.pytorch.org/whl/cu121 # For CUDA 12.1
|
|
29
|
+
|
|
30
|
+
# Or build from source
|
|
31
|
+
pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Torch/CUDA mismatch
|
|
35
|
+
|
|
36
|
+
**Error**: `RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED`
|
|
37
|
+
|
|
38
|
+
**Fix**:
|
|
39
|
+
```bash
|
|
40
|
+
# Check versions
|
|
41
|
+
python -c "import torch; print(torch.__version__, torch.cuda.is_available())"
|
|
42
|
+
|
|
43
|
+
# Reinstall PyTorch with correct CUDA
|
|
44
|
+
pip uninstall torch torchvision
|
|
45
|
+
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Memory Issues
|
|
49
|
+
|
|
50
|
+
### CUDA out of memory
|
|
51
|
+
|
|
52
|
+
**Error**: `torch.cuda.OutOfMemoryError: CUDA out of memory`
|
|
53
|
+
|
|
54
|
+
**Solutions**:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
# Solution 1: Enable CPU offloading
|
|
58
|
+
pipe.enable_model_cpu_offload()
|
|
59
|
+
|
|
60
|
+
# Solution 2: Sequential CPU offload (more aggressive)
|
|
61
|
+
pipe.enable_sequential_cpu_offload()
|
|
62
|
+
|
|
63
|
+
# Solution 3: Attention slicing
|
|
64
|
+
pipe.enable_attention_slicing()
|
|
65
|
+
|
|
66
|
+
# Solution 4: VAE slicing for large images
|
|
67
|
+
pipe.enable_vae_slicing()
|
|
68
|
+
|
|
69
|
+
# Solution 5: Use lower precision
|
|
70
|
+
pipe = DiffusionPipeline.from_pretrained(
|
|
71
|
+
"model-id",
|
|
72
|
+
torch_dtype=torch.float16 # or torch.bfloat16
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Solution 6: Reduce batch size
|
|
76
|
+
image = pipe(prompt, num_images_per_prompt=1).images[0]
|
|
77
|
+
|
|
78
|
+
# Solution 7: Generate smaller images
|
|
79
|
+
image = pipe(prompt, height=512, width=512).images[0]
|
|
80
|
+
|
|
81
|
+
# Solution 8: Clear cache between generations
|
|
82
|
+
import gc
|
|
83
|
+
torch.cuda.empty_cache()
|
|
84
|
+
gc.collect()
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Memory grows over time
|
|
88
|
+
|
|
89
|
+
**Problem**: Memory usage increases with each generation
|
|
90
|
+
|
|
91
|
+
**Fix**:
|
|
92
|
+
```python
|
|
93
|
+
import gc
|
|
94
|
+
import torch
|
|
95
|
+
|
|
96
|
+
def generate_with_cleanup(pipe, prompt, **kwargs):
|
|
97
|
+
try:
|
|
98
|
+
image = pipe(prompt, **kwargs).images[0]
|
|
99
|
+
return image
|
|
100
|
+
finally:
|
|
101
|
+
# Clear cache after generation
|
|
102
|
+
if torch.cuda.is_available():
|
|
103
|
+
torch.cuda.empty_cache()
|
|
104
|
+
gc.collect()
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Large model loading fails
|
|
108
|
+
|
|
109
|
+
**Error**: `RuntimeError: Unable to load model weights`
|
|
110
|
+
|
|
111
|
+
**Fix**:
|
|
112
|
+
```python
|
|
113
|
+
# Use low CPU memory mode
|
|
114
|
+
pipe = DiffusionPipeline.from_pretrained(
|
|
115
|
+
"large-model-id",
|
|
116
|
+
low_cpu_mem_usage=True,
|
|
117
|
+
torch_dtype=torch.float16
|
|
118
|
+
)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Generation Issues
|
|
122
|
+
|
|
123
|
+
### Black images
|
|
124
|
+
|
|
125
|
+
**Problem**: Output images are completely black
|
|
126
|
+
|
|
127
|
+
**Solutions**:
|
|
128
|
+
```python
|
|
129
|
+
# Solution 1: Disable safety checker
|
|
130
|
+
pipe.safety_checker = None
|
|
131
|
+
|
|
132
|
+
# Solution 2: Check VAE scaling
|
|
133
|
+
# The issue might be with VAE encoding/decoding
|
|
134
|
+
latents = latents / pipe.vae.config.scaling_factor # Before decode
|
|
135
|
+
|
|
136
|
+
# Solution 3: Ensure proper dtype
|
|
137
|
+
pipe = pipe.to(dtype=torch.float16)
|
|
138
|
+
pipe.vae = pipe.vae.to(dtype=torch.float32) # VAE often needs fp32
|
|
139
|
+
|
|
140
|
+
# Solution 4: Check guidance scale
|
|
141
|
+
# Too high can cause issues
|
|
142
|
+
image = pipe(prompt, guidance_scale=7.5).images[0] # Not 20+
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Noise/static images
|
|
146
|
+
|
|
147
|
+
**Problem**: Output looks like random noise
|
|
148
|
+
|
|
149
|
+
**Solutions**:
|
|
150
|
+
```python
|
|
151
|
+
# Solution 1: Increase inference steps
|
|
152
|
+
image = pipe(prompt, num_inference_steps=50).images[0]
|
|
153
|
+
|
|
154
|
+
# Solution 2: Check scheduler configuration
|
|
155
|
+
pipe.scheduler = pipe.scheduler.from_config(pipe.scheduler.config)
|
|
156
|
+
|
|
157
|
+
# Solution 3: Verify model was loaded correctly
|
|
158
|
+
print(pipe.unet) # Should show model architecture
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Blurry images
|
|
162
|
+
|
|
163
|
+
**Problem**: Output images are low quality or blurry
|
|
164
|
+
|
|
165
|
+
**Solutions**:
|
|
166
|
+
```python
|
|
167
|
+
# Solution 1: Use more steps
|
|
168
|
+
image = pipe(prompt, num_inference_steps=50).images[0]
|
|
169
|
+
|
|
170
|
+
# Solution 2: Use better VAE
|
|
171
|
+
from diffusers import AutoencoderKL
|
|
172
|
+
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse")
|
|
173
|
+
pipe.vae = vae
|
|
174
|
+
|
|
175
|
+
# Solution 3: Use SDXL or refiner
|
|
176
|
+
pipe = DiffusionPipeline.from_pretrained(
|
|
177
|
+
"stabilityai/stable-diffusion-xl-base-1.0"
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# Solution 4: Upscale with img2img
|
|
181
|
+
upscale_pipe = StableDiffusionImg2ImgPipeline.from_pretrained(...)
|
|
182
|
+
upscaled = upscale_pipe(
|
|
183
|
+
prompt=prompt,
|
|
184
|
+
image=image.resize((1024, 1024)),
|
|
185
|
+
strength=0.3
|
|
186
|
+
).images[0]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Prompt not being followed
|
|
190
|
+
|
|
191
|
+
**Problem**: Generated image doesn't match the prompt
|
|
192
|
+
|
|
193
|
+
**Solutions**:
|
|
194
|
+
```python
|
|
195
|
+
# Solution 1: Increase guidance scale
|
|
196
|
+
image = pipe(prompt, guidance_scale=10.0).images[0]
|
|
197
|
+
|
|
198
|
+
# Solution 2: Use negative prompts
|
|
199
|
+
image = pipe(
|
|
200
|
+
prompt="A red car",
|
|
201
|
+
negative_prompt="blue, green, yellow, wrong color",
|
|
202
|
+
guidance_scale=7.5
|
|
203
|
+
).images[0]
|
|
204
|
+
|
|
205
|
+
# Solution 3: Use prompt weighting
|
|
206
|
+
# Emphasize important words
|
|
207
|
+
prompt = "A (red:1.5) car on a street"
|
|
208
|
+
|
|
209
|
+
# Solution 4: Use longer, more detailed prompts
|
|
210
|
+
prompt = """
|
|
211
|
+
A bright red sports car, ferrari style, parked on a city street,
|
|
212
|
+
photorealistic, high detail, 8k, professional photography
|
|
213
|
+
"""
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Distorted faces/hands
|
|
217
|
+
|
|
218
|
+
**Problem**: Faces and hands look deformed
|
|
219
|
+
|
|
220
|
+
**Solutions**:
|
|
221
|
+
```python
|
|
222
|
+
# Solution 1: Use negative prompts
|
|
223
|
+
negative_prompt = """
|
|
224
|
+
bad hands, bad anatomy, deformed, ugly, blurry,
|
|
225
|
+
extra fingers, mutated hands, poorly drawn hands,
|
|
226
|
+
poorly drawn face, mutation, deformed face
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
# Solution 2: Use face-specific models
|
|
230
|
+
# ADetailer or similar post-processing
|
|
231
|
+
|
|
232
|
+
# Solution 3: Use ControlNet for poses
|
|
233
|
+
# Load pose estimation and condition generation
|
|
234
|
+
|
|
235
|
+
# Solution 4: Inpaint problematic areas
|
|
236
|
+
mask = create_face_mask(image)
|
|
237
|
+
fixed = inpaint_pipe(
|
|
238
|
+
prompt="beautiful detailed face",
|
|
239
|
+
image=image,
|
|
240
|
+
mask_image=mask
|
|
241
|
+
).images[0]
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Scheduler Issues
|
|
245
|
+
|
|
246
|
+
### Scheduler not compatible
|
|
247
|
+
|
|
248
|
+
**Error**: `ValueError: Scheduler ... is not compatible with pipeline`
|
|
249
|
+
|
|
250
|
+
**Fix**:
|
|
251
|
+
```python
|
|
252
|
+
from diffusers import EulerDiscreteScheduler
|
|
253
|
+
|
|
254
|
+
# Create scheduler from config
|
|
255
|
+
pipe.scheduler = EulerDiscreteScheduler.from_config(
|
|
256
|
+
pipe.scheduler.config
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
# Check compatible schedulers
|
|
260
|
+
print(pipe.scheduler.compatibles)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Wrong number of steps
|
|
264
|
+
|
|
265
|
+
**Problem**: Model generates different quality with same steps
|
|
266
|
+
|
|
267
|
+
**Fix**:
|
|
268
|
+
```python
|
|
269
|
+
# Reset timesteps explicitly
|
|
270
|
+
pipe.scheduler.set_timesteps(num_inference_steps)
|
|
271
|
+
|
|
272
|
+
# Check scheduler's step count
|
|
273
|
+
print(len(pipe.scheduler.timesteps))
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## LoRA Issues
|
|
277
|
+
|
|
278
|
+
### LoRA weights not loading
|
|
279
|
+
|
|
280
|
+
**Error**: `RuntimeError: Error(s) in loading state_dict for UNet2DConditionModel`
|
|
281
|
+
|
|
282
|
+
**Fix**:
|
|
283
|
+
```python
|
|
284
|
+
# Check weight file format
|
|
285
|
+
# Should be .safetensors or .bin
|
|
286
|
+
|
|
287
|
+
# Load with correct key prefix
|
|
288
|
+
pipe.load_lora_weights(
|
|
289
|
+
"path/to/lora",
|
|
290
|
+
weight_name="lora.safetensors"
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
# Try loading into specific component
|
|
294
|
+
pipe.unet.load_attn_procs("path/to/lora")
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### LoRA not affecting output
|
|
298
|
+
|
|
299
|
+
**Problem**: Generated images look the same with/without LoRA
|
|
300
|
+
|
|
301
|
+
**Fix**:
|
|
302
|
+
```python
|
|
303
|
+
# Fuse LoRA weights
|
|
304
|
+
pipe.fuse_lora(lora_scale=1.0)
|
|
305
|
+
|
|
306
|
+
# Or set scale explicitly
|
|
307
|
+
pipe.set_adapters(["lora_name"], adapter_weights=[1.0])
|
|
308
|
+
|
|
309
|
+
# Verify LoRA is loaded
|
|
310
|
+
print(list(pipe.unet.attn_processors.keys()))
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Multiple LoRAs conflict
|
|
314
|
+
|
|
315
|
+
**Problem**: Multiple LoRAs produce artifacts
|
|
316
|
+
|
|
317
|
+
**Fix**:
|
|
318
|
+
```python
|
|
319
|
+
# Load with different adapter names
|
|
320
|
+
pipe.load_lora_weights("lora1", adapter_name="style")
|
|
321
|
+
pipe.load_lora_weights("lora2", adapter_name="subject")
|
|
322
|
+
|
|
323
|
+
# Balance weights
|
|
324
|
+
pipe.set_adapters(
|
|
325
|
+
["style", "subject"],
|
|
326
|
+
adapter_weights=[0.5, 0.5] # Lower weights
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
# Or use LoRA merge before loading
|
|
330
|
+
# Merge LoRAs offline with appropriate ratios
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## ControlNet Issues
|
|
334
|
+
|
|
335
|
+
### ControlNet not conditioning
|
|
336
|
+
|
|
337
|
+
**Problem**: ControlNet has no effect on output
|
|
338
|
+
|
|
339
|
+
**Fix**:
|
|
340
|
+
```python
|
|
341
|
+
# Check control image format
|
|
342
|
+
# Should be RGB, matching generation size
|
|
343
|
+
control_image = control_image.resize((512, 512))
|
|
344
|
+
|
|
345
|
+
# Increase conditioning scale
|
|
346
|
+
image = pipe(
|
|
347
|
+
prompt=prompt,
|
|
348
|
+
image=control_image,
|
|
349
|
+
controlnet_conditioning_scale=1.0, # Try 0.5-1.5
|
|
350
|
+
num_inference_steps=30
|
|
351
|
+
).images[0]
|
|
352
|
+
|
|
353
|
+
# Verify ControlNet is loaded
|
|
354
|
+
print(pipe.controlnet)
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Control image preprocessing
|
|
358
|
+
|
|
359
|
+
**Fix**:
|
|
360
|
+
```python
|
|
361
|
+
from controlnet_aux import CannyDetector
|
|
362
|
+
|
|
363
|
+
# Proper preprocessing
|
|
364
|
+
canny = CannyDetector()
|
|
365
|
+
control_image = canny(input_image)
|
|
366
|
+
|
|
367
|
+
# Ensure correct format
|
|
368
|
+
control_image = control_image.convert("RGB")
|
|
369
|
+
control_image = control_image.resize((512, 512))
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Hub/Download Issues
|
|
373
|
+
|
|
374
|
+
### Model download fails
|
|
375
|
+
|
|
376
|
+
**Error**: `requests.exceptions.ConnectionError`
|
|
377
|
+
|
|
378
|
+
**Fix**:
|
|
379
|
+
```bash
|
|
380
|
+
# Set longer timeout
|
|
381
|
+
export HF_HUB_DOWNLOAD_TIMEOUT=600
|
|
382
|
+
|
|
383
|
+
# Use mirror if available
|
|
384
|
+
export HF_ENDPOINT=https://hf-mirror.com
|
|
385
|
+
|
|
386
|
+
# Or download manually
|
|
387
|
+
huggingface-cli download stable-diffusion-v1-5/stable-diffusion-v1-5
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Cache issues
|
|
391
|
+
|
|
392
|
+
**Error**: `OSError: Can't load model from cache`
|
|
393
|
+
|
|
394
|
+
**Fix**:
|
|
395
|
+
```bash
|
|
396
|
+
# Clear cache
|
|
397
|
+
rm -rf ~/.cache/huggingface/hub
|
|
398
|
+
|
|
399
|
+
# Or set different cache location
|
|
400
|
+
export HF_HOME=/path/to/cache
|
|
401
|
+
|
|
402
|
+
# Force re-download
|
|
403
|
+
pipe = DiffusionPipeline.from_pretrained(
|
|
404
|
+
"model-id",
|
|
405
|
+
force_download=True
|
|
406
|
+
)
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Access denied for gated models
|
|
410
|
+
|
|
411
|
+
**Error**: `401 Client Error: Unauthorized`
|
|
412
|
+
|
|
413
|
+
**Fix**:
|
|
414
|
+
```bash
|
|
415
|
+
# Login to Hugging Face
|
|
416
|
+
huggingface-cli login
|
|
417
|
+
|
|
418
|
+
# Or use token
|
|
419
|
+
pipe = DiffusionPipeline.from_pretrained(
|
|
420
|
+
"model-id",
|
|
421
|
+
token="hf_xxxxx"
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
# Accept model license on Hub website first
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
## Performance Issues
|
|
428
|
+
|
|
429
|
+
### Slow generation
|
|
430
|
+
|
|
431
|
+
**Problem**: Generation takes too long
|
|
432
|
+
|
|
433
|
+
**Solutions**:
|
|
434
|
+
```python
|
|
435
|
+
# Solution 1: Use faster scheduler
|
|
436
|
+
from diffusers import DPMSolverMultistepScheduler
|
|
437
|
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
|
438
|
+
pipe.scheduler.config
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
# Solution 2: Reduce steps
|
|
442
|
+
image = pipe(prompt, num_inference_steps=20).images[0]
|
|
443
|
+
|
|
444
|
+
# Solution 3: Use LCM
|
|
445
|
+
from diffusers import LCMScheduler
|
|
446
|
+
pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")
|
|
447
|
+
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
|
448
|
+
image = pipe(prompt, num_inference_steps=4, guidance_scale=1.0).images[0]
|
|
449
|
+
|
|
450
|
+
# Solution 4: Enable xFormers
|
|
451
|
+
pipe.enable_xformers_memory_efficient_attention()
|
|
452
|
+
|
|
453
|
+
# Solution 5: Compile model
|
|
454
|
+
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### First generation is slow
|
|
458
|
+
|
|
459
|
+
**Problem**: First image takes much longer
|
|
460
|
+
|
|
461
|
+
**Fix**:
|
|
462
|
+
```python
|
|
463
|
+
# Warm up the model
|
|
464
|
+
_ = pipe("warmup", num_inference_steps=1)
|
|
465
|
+
|
|
466
|
+
# Then run actual generation
|
|
467
|
+
image = pipe(prompt, num_inference_steps=50).images[0]
|
|
468
|
+
|
|
469
|
+
# Compile for faster subsequent runs
|
|
470
|
+
pipe.unet = torch.compile(pipe.unet)
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
## Debugging Tips
|
|
474
|
+
|
|
475
|
+
### Enable debug logging
|
|
476
|
+
|
|
477
|
+
```python
|
|
478
|
+
import logging
|
|
479
|
+
logging.basicConfig(level=logging.DEBUG)
|
|
480
|
+
|
|
481
|
+
# Or for specific modules
|
|
482
|
+
logging.getLogger("diffusers").setLevel(logging.DEBUG)
|
|
483
|
+
logging.getLogger("transformers").setLevel(logging.DEBUG)
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Check model components
|
|
487
|
+
|
|
488
|
+
```python
|
|
489
|
+
# Print pipeline components
|
|
490
|
+
print(pipe.components)
|
|
491
|
+
|
|
492
|
+
# Check model config
|
|
493
|
+
print(pipe.unet.config)
|
|
494
|
+
print(pipe.vae.config)
|
|
495
|
+
print(pipe.scheduler.config)
|
|
496
|
+
|
|
497
|
+
# Verify device placement
|
|
498
|
+
print(pipe.device)
|
|
499
|
+
for name, module in pipe.components.items():
|
|
500
|
+
if hasattr(module, 'device'):
|
|
501
|
+
print(f"{name}: {module.device}")
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Validate inputs
|
|
505
|
+
|
|
506
|
+
```python
|
|
507
|
+
# Check image dimensions
|
|
508
|
+
print(f"Height: {height}, Width: {width}")
|
|
509
|
+
assert height % 8 == 0, "Height must be divisible by 8"
|
|
510
|
+
assert width % 8 == 0, "Width must be divisible by 8"
|
|
511
|
+
|
|
512
|
+
# Check prompt tokenization
|
|
513
|
+
tokens = pipe.tokenizer(prompt, return_tensors="pt")
|
|
514
|
+
print(f"Token count: {tokens.input_ids.shape[1]}") # Max 77 for SD
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
### Save intermediate results
|
|
518
|
+
|
|
519
|
+
```python
|
|
520
|
+
def save_latents_callback(pipe, step_index, timestep, callback_kwargs):
|
|
521
|
+
latents = callback_kwargs["latents"]
|
|
522
|
+
|
|
523
|
+
# Decode and save intermediate
|
|
524
|
+
with torch.no_grad():
|
|
525
|
+
image = pipe.vae.decode(latents / pipe.vae.config.scaling_factor).sample
|
|
526
|
+
image = (image / 2 + 0.5).clamp(0, 1)
|
|
527
|
+
image = image.cpu().permute(0, 2, 3, 1).numpy()[0]
|
|
528
|
+
Image.fromarray((image * 255).astype("uint8")).save(f"step_{step_index}.png")
|
|
529
|
+
|
|
530
|
+
return callback_kwargs
|
|
531
|
+
|
|
532
|
+
image = pipe(
|
|
533
|
+
prompt,
|
|
534
|
+
callback_on_step_end=save_latents_callback,
|
|
535
|
+
callback_on_step_end_tensor_inputs=["latents"]
|
|
536
|
+
).images[0]
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
## Getting Help
|
|
540
|
+
|
|
541
|
+
1. **Documentation**: https://huggingface.co/docs/diffusers
|
|
542
|
+
2. **GitHub Issues**: https://github.com/huggingface/diffusers/issues
|
|
543
|
+
3. **Discord**: https://discord.gg/diffusers
|
|
544
|
+
4. **Forum**: https://discuss.huggingface.co
|
|
545
|
+
|
|
546
|
+
### Reporting Issues
|
|
547
|
+
|
|
548
|
+
Include:
|
|
549
|
+
- Diffusers version: `pip show diffusers`
|
|
550
|
+
- PyTorch version: `python -c "import torch; print(torch.__version__)"`
|
|
551
|
+
- CUDA version: `nvcc --version`
|
|
552
|
+
- GPU model: `nvidia-smi`
|
|
553
|
+
- Full error traceback
|
|
554
|
+
- Minimal reproducible code
|
|
555
|
+
- Model name/ID used
|