Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-PiD > PiD Sample

ComfyUI Node: PiD Sample

Class Name

PiDSample

Category
PiD/Staged
Author
merserk (Account age: 1273days)
Extension
ComfyUI-PiD
Latest Updated
2026-05-25
Github Stars
0.03K

How to Install ComfyUI-PiD

Install this extension via the ComfyUI Manager by searching for ComfyUI-PiD
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-PiD in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

PiD Sample Description

Generate diverse and aligned image samples for AI art using advanced techniques within ComfyUI-PiD framework.

PiD Sample:

PiDSample is a crucial node within the ComfyUI-PiD framework, designed to facilitate the sampling process in the staged decoding pipeline. Its primary function is to generate samples from a prepared batch of data, which is essential for producing high-quality images in AI art generation. By leveraging advanced sampling techniques, PiDSample ensures that the generated samples are both diverse and aligned with the desired artistic style. This node plays a vital role in transforming latent representations into tangible outputs, making it an indispensable component for artists seeking to explore creative possibilities with AI. The node's capabilities are tailored to handle complex sampling tasks, providing users with the flexibility to adjust parameters for optimal results.

PiD Sample Input Parameters:

prepared

The prepared parameter is an instance of PiDPreparedBatch, which contains the pre-processed data necessary for sampling. This parameter is crucial as it provides the foundational data from which samples are generated. The quality and characteristics of the prepared batch directly influence the final output, making it essential to ensure that this data is accurately prepared before sampling.

pid_steps

The pid_steps parameter determines the number of steps the sampling process will take. This parameter impacts the refinement and detail of the generated samples, with higher values typically resulting in more detailed outputs. There is no explicit minimum or maximum value provided, but it is generally advisable to choose a value that balances computational efficiency with the desired level of detail.

cfg_scale

The cfg_scale parameter is a float that influences the guidance scale during sampling. It affects how closely the generated samples adhere to the input conditions or prompts. A higher cfg_scale value can lead to outputs that are more faithful to the input conditions, while a lower value might allow for more creative variations. The choice of cfg_scale should align with the artistic goals of the user.

seed

The seed parameter is an integer that sets the random seed for the sampling process. This parameter is essential for ensuring reproducibility, as it allows users to generate the same samples across different runs by using the same seed value. The seed can be any integer, and changing it will result in different sampling outcomes.

aggressive_cleanup

The aggressive_cleanup parameter is a boolean that determines whether aggressive memory cleanup should be performed during the sampling process. When set to True, it helps manage memory usage more efficiently, which can be beneficial in environments with limited resources. The default value is True, but users can disable it if memory constraints are not a concern.

sequential_offload

The sequential_offload parameter is a string that specifies whether sequential offloading of data should be enabled. This parameter can help manage memory usage by offloading data sequentially during the sampling process. The default value is "disabled", but users can enable it if they encounter memory limitations.

PiD Sample Output Parameters:

sampled

The sampled output parameter is an instance of PiDSampledBatch, which contains the generated samples in the form of a tensor. This output is the result of the sampling process and serves as the input for subsequent stages in the pipeline, such as finalization and image generation. The sampled parameter is crucial for transforming latent representations into visual outputs, making it a key component in the AI art creation process.

PiD Sample Usage Tips:

  • Experiment with different pid_steps values to find the optimal balance between detail and computational efficiency for your specific project.
  • Adjust the cfg_scale parameter to control the adherence of the generated samples to the input conditions, allowing for either more faithful or more creative outputs.
  • Use the seed parameter to ensure reproducibility of results, especially when fine-tuning the sampling process for specific artistic goals.

PiD Sample Common Errors and Solutions:

PiDNodeError: PiD Finalize expected a PID_SAMPLES object from PiD Sample.

  • Explanation: This error occurs when the finalize method receives an incorrect type of object, indicating that the output from PiDSample is not a PiDSampledBatch.
  • Solution: Ensure that the sample method of PiDSample is correctly executed and that the output is indeed a PiDSampledBatch before passing it to the finalize method. Double-check the data flow and parameter configurations to prevent type mismatches.

PiD Sample Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-PiD
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

PiD Sample